How to blame in git

・0 min read

Git blame from the command line.

Command format:

git blame -L<LINE_NUMBER>,+<NUMBER_OF_LINES> [<COMMIT>] -- <FILE>

Git blame a file:

git blame -L100,+10 -- file.txt

Git blame on a specific commit:

git blame -L100,+10 fe25b6d^ -- file.txt

Subscribe

Receive updates on new posts.