我最近一直在使用 Fugitive 的 Gblame,但不太明白“reblame”的作用。
有人可以更清楚地描述这些选项的作用:
- reblame at commit
~ reblame at [count]th first grandparent
P reblame at [count]th parent (like HEAD^[count])
我最近一直在使用 Fugitive 的 Gblame,但不太明白“reblame”的作用。
有人可以更清楚地描述这些选项的作用:
- reblame at commit
~ reblame at [count]th first grandparent
P reblame at [count]th parent (like HEAD^[count])
将 reblame 视为导航到提交,然后在您的文件上运行责备或git blame <commit> -- <file>
-
最简单的情况。在光标下使用有问题的提交并重新归咎于文件。~
相当于跑 git blame <rev>~[count] -- <file>
P
相当于跑 git blame <rev>^[count] -- <file>
对于常见情况,即 no和[count]
是等价的。(注意默认为1)~
P
[count]
快速修订教程取自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
如需更多帮助,git blame
请参阅git help blame