Forrest logo
back to the git tool

git-range-diff:tldr:2c503

git-range-diff: Diff the changes of two commit ranges, e.g. to check whether conflicts have been resolved appropriately when rebasing commits from `base1` to `base2`.
$ git range-diff ${base1}..${rev1} ${base2}..${rev2}
try on your machine

The git range-diff command is used to compare two sets of commits by their differences. It generates a diff summary of the changes between the given revision ranges.

The command syntax is:

git range-diff ${base1}..${rev1} ${base2}..${rev2}

Here's what each parameter represents:

  • ${base1}: The starting commit (base) of the first range of commits.
  • ${rev1}: The ending commit (revision) of the first range of commits.
  • ${base2}: The starting commit (base) of the second range of commits.
  • ${rev2}: The ending commit (revision) of the second range of commits.

The command compares the commits between ${base1} and ${rev1} with the commits between ${base2} and ${rev2}. It displays a summary of the differences using the git diff format, highlighting the added, modified, and deleted lines.

This command is helpful when you want to see a concise overview of the changes between two commit ranges without inspecting each commit individually. It can assist in reviewing and understanding the modifications made in each range.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool