- Instead of a normal pull, try this:
git pull --rebase origin master
- ‘The
--rebase
option tells Git to move all of Mary’s commits to the tip of the master branch after synchronising it with the changes from the central repository.’ - From here: https://www.atlassian.com/git/tutorials/comparing-workflows/centralized-workflow
- This removes the superfluous ‘merge commit’ that comes up normally.
- After fixing a merge conflict:
git add <some-file>
git rebase --continue
- To abort:
git rebase --abort
- Finally:
git push origin master