Friday, June 1, 2012

Git: Creating a New Branch and Sharing It

git branch new_branch_name

git checkout new_branch_name

At this point, even if there are uncommitted files in the working directory, they won't be changed. They can then be committed into the branch.

To publish to remote:
git push -u origin new_branch_name

Other users:
git fetch
git checkout new_branch_name

No comments:

Post a Comment