Git blame command

The git blame command is used to display of author metadata attached to specific committed lines in a file.

git blame <file-name>
It returns the following result.

Your image is not available

It shows commit hash, author, and last modified timestamp of each line of a file. At the very left we can see the commit id. We can see the different commit id in which the last change was done in that line.

The option -s in git blame is used to filter only the commit hash.


git blame -s index.html

Now we cannot see the author and last modified timestamp in the result.

Your image is not available