I forgot to do a
Assume the history consists of two branches -
topic is the branch you created from master without doing a
git reset --merge ORIG_HEAD // Undo git-merge git checkout master git pull git rebase master topic // Replay commits of topic on new master
After this you can proceed with merge (if required).
For more detail on undo git-merge, refer here