Git能显示选定行的历史记录吗? [英] Can Git show history for selected lines?
问题描述
我有一个大文件,在中间的某个地方,有一个我知道已经修改了几次的函数。 git annotate
或 blame
会显示每行的最近提交,但如果我是对的,它会显示<只是最近的一个,而不是其他影响该行的提交列表。
在 Git中的一条评论中 - 我如何查看方法/函数的更改历史记录?,
git gui blame< file>
然后右键点击一行并选择 Blame Parent Commit 做什么我需要。
I have a large file where, somewhere in the middle, there is a function that I know has been modified several times. git annotate
or blame
will show the most recent commit for each line but if I'm right, it will show only the most recent one, not a list of other commits that affected that line before.
So is there a command in Git where I could say something like show me commits that affected lines 250..260 in file XYZ?
As suggested in one of the comments in Git - how do I view the change history of a method/function?, doing
git gui blame <file>
and then right-clicking a line and selecting Blame Parent Commit does what I need.
这篇关于Git能显示选定行的历史记录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!