2021-01-07 21:48:05 +00:00
|
|
|
# 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}}`
|
|
|
|
|
2024-01-03 13:17:51 +00:00
|
|
|
- Print a file with the author [e]mail and commit hash prepended to each line:
|
2021-01-07 21:48:05 +00:00
|
|
|
|
|
|
|
`git annotate -e {{path/to/file}}`
|
2023-01-25 13:37:47 +00:00
|
|
|
|
|
|
|
- Print only rows that match a regular expression:
|
|
|
|
|
|
|
|
`git annotate -L :{{regexp}} {{path/to/file}}`
|