Compare Patch Series With git range-diff

See what changed between the old and new versions of a branch.

macOSdiffgitcliLow risk
Run git range-diff base..old base..new to diff the two series.

01Command

Command
$ git range-diff main..old-feature main..new-feature

02What it does

After a rebase or force-push, range-diff shows which patches changed, were added or dropped, unlike a normal diff that compares file contents. Reviewers use it to see only what moved between revisions of a pull request.

03Risk

RiskLow risk
RequirementsGit 2.20+ (install with Homebrew or Xcode Command Line Tools)
CompatibilitymacOS with Git installed (Homebrew or Xcode Command Line Tools)
!Warning: It needs the old branch state to still be available, for example via a remote-tracking ref or the reflog.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-10-13 · Category: Developer