Low Level

If you know the sha1 of the top of tree you can trust every single piece of it.
paraphrased from:

https://www.youtube.com/watch?v=4XpnKHJAok8&t=3382

High Level

Standard Merge

Fast-Forward (FF) Merge

  • Not really a merge, just moves pointer
  • Only possible when parent has not diverged

Resolving A Remote Conflict

First "Merge-Back" From Remote

  • git pull

Now Push As FF

  • git push
  • Extra merge commit to audit

Resolving A Remote Conflict (Simple Rebase)

Rebase Against Remote

  • git pull --rebase
    • git fetch + git rebase

Now Push As FF

  • git push
  • Yay, no merge commits!

More Complex Merge vs Rebase

Progress On Both Branches

Merge Is Not Terrible Here

  • Any conflict appears on PR
  • Reasonably simple history for reviewer

But Sometime The History Is Messy

  • Any conflict appears on PR
  • Difficult history for reviewer

Before Merging Feature, Rebase!

  • Author can fix conflicts before PR
  • No merge history for reviewer to consider

FF Merge Loses Branch

  • Technically Ok
  • Nice to remember work on branch

Preserve Record of Branch

  • git merge --no-ff
  • Can still push to remote, the "merge" is FF-able