Blaming
suggest changeSyntax
- git blame [filename]
- git blame [-f][-e][-w] [filename]
- git blame [-L range] [filename]
Parameters
| Parameter | Details |
|---|---|
| filename | Name of the file to inspect |
| -f | Show the file name in the original commit |
| -e | Show the author email instead of the author name |
| -w | Ignore whitespace when comparing a line with its parent version |
| -L start,end | Show only the given line range. Example: git blame -L 1,2 [filename] |
| --show-stats | Show extra statistics at the end of the blame output |
| -l | Show the full revision (default: off) |
| -t | Show the raw timestamp (default: off) |
| -reverse | Walk history forward instead of backward |
| -p, --porcelain | Output for machine consumption |
| -M | Detect lines moved or copied within a file |
| -C | In addition to -M, detect lines moved or copied from other files modified in the same commit |
| -h | Show the help message |
| -c | Use the same output mode as git annotate (default: off) |
| -n | Show the line number in the original commit (default: off) |
Remarks
git blame shows who last changed each line of a file.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents