What is `git range-diff` and when would you use it?
AdvancedConceptMerge, rebase and cherry-pick
Answer
It compares two versions of a patch series commit-by-commit, matching them even when rebased or amended. It is excellent for reviewing what changed between iteration 1 and iteration 2 of a force-pushed PR.
git range-diff origin/main old-feature new-feature
git range-diff main...feature@{1} main...feature
More on Merge, rebase and cherry-pick
What is the difference between a fast-forward merge and a merge commit?BeginnerHow does a three-way merge work?IntermediateWhat does `git rebase` actually do?IntermediateMerge versus rebase: how do you decide?IntermediateWhat are squash merge, merge commit and rebase-and-merge on GitHub?IntermediateWhy does a squash-merged branch show as unmerged to `git branch --merged`?Intermediate