mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-24 21:52:17 +00:00
Update cheatsheets
This commit is contained in:
25
git-blame
Normal file
25
git-blame
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git blame
|
||||
|
||||
> Show commit hash and last author on each line of a file.
|
||||
> More information: <https://git-scm.com/docs/git-blame>.
|
||||
|
||||
- Print file with author name and commit hash on each line:
|
||||
|
||||
`git blame {{path/to/file}}`
|
||||
|
||||
- Print file with author email and commit hash on each line:
|
||||
|
||||
`git blame -e {{path/to/file}}`
|
||||
|
||||
- Print file with author name and commit hash on each line at a specific commit:
|
||||
|
||||
`git blame {{commit}} {{path/to/file}}`
|
||||
|
||||
- Print file with author name and commit hash on each line before a specific commit:
|
||||
|
||||
`git blame {{commit}}~ {{path/to/file}}`
|
||||
Reference in New Issue
Block a user