mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-08 09:46:00 +00:00
Update cheatsheets
This commit is contained in:
23
git-annotate
Normal file
23
git-annotate
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 -e {{path/to/file}}`
|
||||
|
||||
- Print only rows that match a regular expression:
|
||||
|
||||
`git annotate -L :{{regexp}} {{path/to/file}}`
|
||||
Reference in New Issue
Block a user