The git server I am trying to pull has a new branch . (call it branch-9)
In my local, I don’t have that and I do I pull it to my local computer?
should I run this?
$git checkout -b branch-9
$git pull branch-9
is that the right way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Doing a
git fetchwill, if you have configured the git server as a remote, create a local tracking branch.The long form of the above command is:
after you’ve started making local changes to your copy of
branch-9, then you might want to usegit pull.git pullis the same asgit fetchand eithergit mergeorgit rebase(depending on your settings, defaulting togit merge).