Linux command
git-range-diff 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compare two revision ranges
git range-diff [base1]..[rev1] [base2]..[rev2]
Compare with upstream
git range-diff @{u} @{1} @
Compare rebase iterations
git range-diff [main]..@{1} [main]..@
Show with color
git range-diff --color [range1] [range2]
说明
git range-diff compares two commit ranges, showing how a series of patches changed between versions. It performs a diff-of-diffs, matching commits between the two ranges based on content similarity and revealing what changed during a rebase, amend, or other history rewrite. Common use cases include comparing a feature branch before and after rebasing, reviewing how patches evolved during iterative development, or verifying that a rebase preserved intended changes. The output uses dual coloring to distinguish between the two levels of diff.
参数
- --creation-factor _n_
- Commit matching threshold.
- --no-dual-color
- Disable dual color mode.
- --notes _ref_
- Show notes.
FAQ
What is the git-range-diff command used for?
git range-diff compares two commit ranges, showing how a series of patches changed between versions. It performs a diff-of-diffs, matching commits between the two ranges based on content similarity and revealing what changed during a rebase, amend, or other history rewrite. Common use cases include comparing a feature branch before and after rebasing, reviewing how patches evolved during iterative development, or verifying that a rebase preserved intended changes. The output uses dual coloring to distinguish between the two levels of diff.
How do I run a basic git-range-diff example?
Run `git range-diff [base1]..[rev1] [base2]..[rev2]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --creation-factor _n_ do in git-range-diff?
Commit matching threshold.