git blame
Show commit hash and last author on each line of a file. More information: https://git-scm.com/docs/git-blame.
-
Print file with author name and commit hash on each line:
git blame {{path/to/file}}
-
Print file with author email and commit hash on each line:
git blame -e {{path/to/file}}
-
Print file with author name and commit hash on each line at a specific commit:
git blame {{commit}} {{path/to/file}}
-
Print file with author name and commit hash on each line before a specific commit:
git blame {{commit}}~ {{path/to/file}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.