How does one get the code from the master to the local branch called "mybranch" so the local branch has the latest code? Assume local branch did not have code changed since it was created from master and now it is few versions behind the master.
Asked
Active
Viewed 7,174 times
3 Answers
0
checkout to your branch:
git checkout mybranch
then update master and rebase your branch.
git pull --rebase origin master
this is in case you don't mind rebasing and also updating master. You could also not rebase (say, if mybranch is in the remote and you don't want to remove it to be able to push later) and just merge with
git pull origin master

Guillermo Blanco
- 95
- 7
-
5Please explain what you did, avoid only code answer – GGO Mar 01 '18 at 08:51