1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-05 15:55:42 +02:00
tldr/pages/common/git-annotate.md
Managor ba6daef39d
*: standardize regex usage (#17328)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
2025-07-25 08:50:06 +03:00

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