| 34 | Assigning Blame |
Despite its combative name, git blame
is a useful tool for determining what the original developer was
thinking. Most bugs manifest themselves with an error at a
specific point. You can use git blame
to find out when the problem line was introduced into the
repository and use that as a jumping-off point for further
investigation.
git blame displays all or a portion of a
file with annotations showing when the change was made, by who, and,
more importantly, in what revision the change was made. Armed with
that, you can inspect the log to determine what the original author
intended.
git blame outputs the following
information:
-
Short commit ID
-
Author’s name
-
Date and time of commit
-
Line number
By default, ...