git blame - ignore uncommitted changes
Asked Answered
U

1

22

Partial output from 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) ...
    ...

How does one get git blame to ignore uncommitted changes from the file?

Underlay answered 27/6, 2012 at 12:40 Comment(0)
U
29
git blame HEAD <file>

From the git blame manual:

Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the given revision.

Underlay answered 27/6, 2012 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.