git annotate
Show commit hash and last author on each line of a file. Seegit blame
, which is preferred overgit annotate
.git annotate
is provided for those familiar with other version control systems. More information: https://git-scm.com/docs/git-annotate.
-
Print a file with the author name and commit hash prepended to each line:
git annotate {{path/to/file}}
-
Print a file with the author email and commit hash prepended to each line:
git annotate -e {{path/to/file}}
-
Print only rows that match a regular expression:
git annotate -L :{{regexp}} {{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.