Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以要求git diff只检查文件中某些行的更改?就像我运行一样git diff some-file,我会看到很多变化......文件的不同部分,但如果我只想查看与文件的某一特定行相关的差异?还是只有几行?有类似 -L from 的东西git blame吗?
git diff
git diff some-file
git blame
Git 目前无法将其输入填充到其各种差异算法中,而不是整个输入文件。
实际的 diff 代码(在xdiff/*Git 源代码中)可以完成这项工作,如果您只是为其提供正确的输入,但 Git 中没有任何东西可以做到这一点。
xdiff/*