I’ve forked a project. I’ve also added handle ‘upstream’ that points to the original repository, and origin points to forked repository. After few days, i tried to fetch content from upstream and rebase it. After rebase, it shows branch diverging message.
Commands i used are:
git fetch upstream master
git rebase upstream/master
In what case does this happen or am i doing something wrong here?
p.s. I was on local master branch while executing those commands. Since i did not make any changes/commits i think i could have used pull command.
If you’re not making any changes and just trying to keep your fork up to date, the workflow would be (assuming you have master checked out):
The middle command is what you are missing. If you don’t care about having a local branch that’s up to date, then you can just (does not require master being checked out):
That will move sync your fork but will not involve the local branch.
Hope this helps.