git blame
git blame [-L <start>,<end>] <file>
Risk: Safe
What it does
Shows who last changed each line of a file, and in which commit.
When to use it
To learn why a line looks the way it does.
Example
$ git blame index.htmlEach line gets a commit id, a name and a date.
$ git blame -L 2,3 index.htmlLook at lines 2 to 3 only.
Learn it in: Search your history · Official docs