Progress:
TIER 1 · MODULE 39· Basics

git range-diff

How did this rebase change my commits, really?

🎯 What & why

Compare two patch series. Tells you what's the same, what's been added/dropped/reordered, what the diffs of the diffs look like. Indispensable for re-rolled patch sets.

🧠 Mental model

Range-diff hashes each commit in both series with patch-id to match equivalent commits across the two ranges, then diffs the matching pairs. Two-color output: one color shows what one side has, the other shows the diff between matched pairs.

🛠️ Synopsis

git range-diff [--color=[<when>]] [--no-color] [<diff-options>]
               [--no-dual-color] [--creation-factor=<factor>]
               [--left-only | --right-only]
               ( <range1> <range2> | <rev1>...<rev2> | <base> <rev1> <rev2> )
               [[--] <path>...]

🎚️ Switches & options

FlagWhat it does
<rev1>...<rev2>Compare two ranges anchored at their merge-base.
--creation-factor=<n>How aggressively to match commits across the two series.
--no-dual-colorDisable the per-side color coding.

💡 Use cases

🧪 Examples

Compare two versions of a feature branch.
$ git range-diff main..feature-v1 main..feature-v2

🎓 Recommendations

🪤 Common pitfalls

🔗 Related modules

📝 Quiz

Hit each option, then Check answers. Score is recorded; Next is always open.