1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/git-annotate.md
Managor db25f60eb1
git-*: convert options to longform and minor fixes (#13441)
Co-authored-by: spageektti <git@spageektti.cc>
Co-authored-by: Fazle Arefin <fazlearefin@users.noreply.github.com>
2024-08-31 13:06:48 +02:00

18 lines
622 B
Markdown

# 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>.
- 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 [e]mail and commit hash prepended to each line:
`git annotate {{--show-email|-e}} {{path/to/file}}`
- Print only rows that match a regular expression:
`git annotate -L :{{regexp}} {{path/to/file}}`