Print a file with the author email and commit hash prepended to each line

git annotate

  • Show commit hash and last author on each line of a file.
    See `git blame`, which is preferred over `git annotate`.
    `git annotate` is provided for those familiar with other version control systems.
    More information: <https://git-scm.com/docs/git-annotate>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git annotate -e {{path/to/file}}

click the source code to copy install git annotate on any operating system with command-not-found.com