GitBlaming


Syntax

  • git blame [filename]
  • git blame [-f][-e][-w] [filename]
  • git blame [-L range] [filename]

Parameters

ParameterDetails
filenameName of the file for which details need to be checked
-fShow the file name in the origin commit
-eShow the author email instead of author name
-wIgnore white spaces while making a comparison between child and parent's version
-L start,endShow only the given line range Example: git blame -L 1,2 [filename]
--show-statsShows additional statistics at end of blame output
-lShow long rev (Default: off)
-tShow raw timestamp (Default: off)
-reverseWalk history forward instead of backward
-p, --porcelainOutput for machine consumption
-MDetect moved or copied lines within a file
-CIn addition to -M, detect lines moved or copied from other files that were modified in the same commit
-hShow the help message
-cUse the same output mode as git-annotate (Default: off)
-nShow the line number in the original commit (Default: off)

Remarks

The git blame command is very useful when it comes to know who has made changes to a file on a per line base.