mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 20:11:19 +08:00
e857611f9f
Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com> Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
984 B
984 B
git blame
Show what commit and author last modified each line of a file. More information: https://git-scm.com/docs/git-blame.
- Print a file with authorship info (author name and commit hash):
git blame {{path/to/file}}
- Print the author's email instead of their name:
git blame {{[-e|--show-email]}} {{path/to/file}}
- Print a file with authorship info as of a specific commit:
git blame {{commit}} {{path/to/file}}
- Print a file with authorship info before a specific commit:
git blame {{commit}}~ {{path/to/file}}
- Print a file with authorship info starting at a given line:
git blame -L {{123}} {{path/to/file}}
- Annotate a specific line range of a file:
git blame -L {{start_line}},{{end_line}} {{path/to/file}}
- Annotate 10 lines of a file starting at the first line matching a given text:
git blame -L '/{{text}}/',+10 {{path/to/file}}
- Annotate a file ignoring whitespaces and line moves:
git blame -w -C -C -C {{path/to/file}}