Git怪 - 之前的提交? [英] Git blame -- prior commits?
问题描述
我喜欢 git blame
命令,这对于追踪不需要编写代码的人来说非常有用。 : - )
然而,是否有可能在之前编辑特定的行
例如,我运行以下(在超级 uncrustify
项目):
$ git blame -L10,+ 1 src / options.cpp
^ fe25b6d(Ben Gardner 2009- 10-17 13:13:55 -0500 10)#includeprototypes.h
如何可以我在 commit fe25b6d
之前找出谁编辑过这行?谁在 之前编辑过它?我相信这是可能的,但我的git-fu很薄弱。
您可以指定一个修订版让git blame回头看看(而不是默认的 HEAD
); fe25b6d ^
是 fe25b6d
的父级。
I love the git blame
command, it is very useful for tracking down people who don't own up to writing code. :-)
However, is it possible to see who edited a specific line before the commit reported by git blame
, e.g. a history of commits for a given line?
For example, I run the following (on the superb uncrustify
project):
$ git blame -L10,+1 src/options.cpp
^fe25b6d (Ben Gardner 2009-10-17 13:13:55 -0500 10) #include "prototypes.h"
How can I find out who edited that line before commit fe25b6d
? And who edited it before that commit? I am sure this would be possible, but my git-fu is weak.
git blame -L10,+1 fe25b6d^ -- src/options.cpp
You can specify a revision for git blame to look back starting from (instead of the default of HEAD
); fe25b6d^
is the parent of fe25b6d
.
这篇关于Git怪 - 之前的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!