Git – Update local branch with remote Develop
Follow the below steps:
git checkout develop git pull git checkout <your-branch-name> git merge develop
The above steps will merge the changes fromdevelop
into your branch and probably create a new commit, with a comment making it clear that it's a merge. There are other ways do to update the local branch, i would say advance option - userebase
instead onmerge
.git checkout develop git pull git checkout <your-branch-name> git rebase develop
the above command will rewind the time to the point at which your branch diverged fromdevelop
, pull in all the changes ondevelop,
thus bringing your branch in line withdevelop
but with no commits and apply your commit at the end. -Hussain