我最近一直在使用Fugitive的Gblame,但不太明白“reblame”的作用。
有人可以更清楚地描述这些选项的作用吗:
- reblame at commit
~ reblame at [count]th first grandparent
P reblame at [count]th parent (like HEAD^[count])
将重责视为导航到提交,然后对您的文件运行责备或git blame <commit> -- <file>
-
-
最简单的情况。使用光标下有问题的提交并重新命名该文件。
-
~
相当于跑步git blame <rev>~[count] -- <file>
-
P
相当于跑步git blame <rev>^[count] -- <file>
对于常见情况,即没有[count]
, ~
and P
是等价的。 (注意[count]
默认为 1)
快速复习教程取自git help gitrevisions
:
Here is an illustration, by Jon Loeliger.
Both commit nodes B and C are parents of commit node A.
Parent commits are ordered left-to-right.
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
A = = A^0
B = A^ = A^1 = A~1
C = A^2 = A^2
D = A^^ = A^1^1 = A~2
E = B^2 = A^^2
F = B^3 = A^^3
G = A^^^ = A^1^1^1 = A~3
H = D^2 = B^^2 = A^^^2 = A~2^2
I = F^ = B^3^ = A^^3^
J = F^2 = B^3^2 = A^^3^2
要了解有关 git 修订符号的更多信息,请参阅:
- git help gitrevisions https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
- Git 工具 - 修订选择 http://git-scm.com/book/en/Git-Tools-Revision-Selection
-
克拉和波形符、重置和恢复 https://gist.github.com/esmooov/2789156注意:本文讨论的是重置,但是图表和修订部分对文章的中间部分很有帮助。
如需更多帮助git blame
see git help blame
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)