Find the commit that last changed a line
git blame annotates lines with the commit and author associated with their latest change. It is useful for locating the history behind a particular implementation.
Blame is for context, not assigning fault
The name of the command can sound accusatory, but its practical purpose is historical investigation. A line may have been moved, generated or changed as part of a larger refactor, so inspect the referenced commit before drawing conclusions.
Follow the history
After finding a commit, use git show and git log to understand the surrounding change and why it was introduced.