Wednesday, 15 September 2010

Beginner's guide to : Create a Git branch

Lets say you want to have a working branch, here's what you need to do.
On your local (automatically added to your remote repo):

$ git push origin master:refs/heads/branchName
e.g.: git push origin master:refs/heads/mybranchname

means that you will create a new branch named 'mybranchname' to the remote repository, copying everything from master.



Next step :

$ git checkout branchName
e.g.: git checkout mybranchname

moving, fetch, and start to work on branch 'mybranchname'



Enjoy!

No comments:

Post a Comment