正如我可以在 git Blame 上找到行间隔的结果
git blame -L 10,23 file.ext
.
我想在提交
gif diff
、hash1
、文件 hash2
、第 10,23 行的间隔中执行 file.ext
。
类似
git diff hash1 hash2 -- file.ext (?) 10,23
.
试试这个:
git diff hash1 hash2 -U0 -L 10,23 -- file.ext
地点:
-U0
:将上下文行数设置为零,确保仅显示更改的行。
-L 10,23
:指定从 10 到 23 的行范围。