Git blame - 忽略未提交的更改

20

git blame <file>的部分输出:

    ...
   d6182477 (<author>          2012-06-22 09:44:02 -0400 239) ...
   d6182477 (<author>          2012-06-22 09:44:02 -0400 240) ...
   25f98f3f (<author>          2012-06-15 15:44:00 -0400 245) ...
   25f98f3f (<author>          2012-06-15 15:44:00 -0400 246) ...
   35853aa2 (<author>          2012-06-22 08:12:41 -0400 247) ...
   25f98f3f (<author>          2012-06-15 15:44:00 -0400 248) ...
-> 00000000 (Not Committed Yet 2012-06-27 08:33:35 -0400 249) ...
-> 00000000 (Not Committed Yet 2012-06-27 08:33:35 -0400 249) ...
   25f98f3f (<author>          2012-06-15 15:44:00 -0400 250) ...
   35853aa2 (<author>          2012-06-22 08:12:41 -0400 251) ...
   25f98f3f (<author>          2012-06-15 15:44:00 -0400 252) ...
    ...

如何让 git blame 忽略文件中未提交的更改?

1个回答

26
git blame HEAD <file>

来自 git blame 使用手册:

对给定文件中的每一行进行注释,提供最后修改该行的修订版本的信息。 可选地,从给定的修订版开始注释。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接