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.jsRelated terms
- git bisect — A command that finds the commit that introduced a bug by binary search: you mark commits good or bad and Git checks out the next one to test.
- git log — The Git command that lists commits with their identifiers, authors, times and messages.
Taught in
- Investigating History: blame, bisect And worktree — Advanced Git Internals & Distributed Workflows