I have local master
and develop
branches. I do all my work on develop
and then merge them into master
for releases. There is
The command you are looking for is:
git checkout develop
git rebase upstream/master
However, Git is smarter than that, you can configure upstream/master as the upstream tracking branch of develop:
git branch --set-upstream-to upstream/master develop
Now when you do git rebase
, it would automatically use 'upstream/master'. But even better, these commands:
git fetch origin
git rebase upstream/master
Can be simplified by simply doing:
git pull --rebase