We always used to create a branch on local system and after verify and ok with code, we merged to master branch. Today i was facing situation, i need to create a branch on remote git repository. Actually my manager wanted to take look to my code before merge to master branch(As he is residing out of country).
1.First create the branch locally:
git branch rspec-test-import 2.List all local branch. git branch *master rspec-test-import 3.Checkout to local branch. git checkout rspec-test-import 4.Again list branch and see where we are? git branch master *rspec-test-import 5.Now create the remote branch and push your code. git push --all OR git push origin rspec-test-import That's it. Now you able to pull and push your changes to branch repository too. Cheers..!!!!!