Git blame

Git - Quick Reference

1 min read

Published Jun 19 2025, updated Aug 17 2026


7
0
0
0

CLIGit

Show which commit last modified each line of a file:

git blame filename

This shows on each line of the file:

  • Commit hash that changed it.
  • Who changed it.
  • Date and time of the change.
  • The line content.

Useful for finding out who introduced a bug.


Show only specific lines of a file:

git blame -L 15,30 filename

Shows just line 15-30 of the file.


Include the author email address as well as the name:

git blame -e filename

Ignore white space changes:

git blame -w filename

Once you have a commit hash from git blame, you can view the full commit with:

git show <commit-hash>

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Git - Quick Reference | Git blame | SimpleSteps.guide