git blame

The command that shows, for each line of a file, the commit, author and date that last changed it.

In more detail

It answers who last touched this line and in which commit, which leads you to that commit's message explaining why. It shows the last change only; a line moved or reformatted points at the commit that moved it.

Example

git blame app.js

Related terms

Taught in

References