ebae20ff33307d218c0790073d4ed9ef8b99ad58
   1git-pickaxe(1)
   2==============
   3
   4NAME
   5----
   6git-pickaxe - Show what revision and author last modified each line of a file
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git-pickaxe' [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>]
  12              [-M] [--since=<date>] [<rev>] [--] <file>
  13
  14DESCRIPTION
  15-----------
  16
  17Annotates each line in the given file with information from the revision which
  18last modified the line. Optionally, start annotating from the given revision.
  19
  20Also it can limit the range of lines annotated.
  21
  22This report doesn't tell you anything about lines which have been deleted or
  23replaced; you need to use a tool such as gitlink:git-diff[1] or the "pickaxe"
  24interface briefly mentioned in the following paragraph.
  25
  26Apart from supporting file annotation, git also supports searching the
  27development history for when a code snippet occured in a change. This makes it
  28possible to track when a code snippet was added to a file, moved or copied
  29between files, and eventually deleted or replaced. It works by searching for
  30a text string in the diff. A small example:
  31
  32-----------------------------------------------------------------------------
  33$ git log --pretty=oneline -S'blame_usage'
  345040f17eba15504bad66b14a645bddd9b015ebb7 blame -S <ancestry-file>
  35ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output
  36-----------------------------------------------------------------------------
  37
  38OPTIONS
  39-------
  40-c, --compatibility::
  41        Use the same output mode as gitlink:git-annotate[1] (Default: off).
  42
  43-L n,m::
  44        Annotate only the specified line range (lines count from 1).
  45
  46-l, --long::
  47        Show long rev (Default: off).
  48
  49-t, --time::
  50        Show raw timestamp (Default: off).
  51
  52-S, --rev-file <revs-file>::
  53        Use revs from revs-file instead of calling gitlink:git-rev-list[1].
  54
  55-f, --show-name::
  56        Show filename in the original commit.  By default
  57        filename is shown if there is any line that came from a
  58        file with different name, due to rename detection.
  59
  60-n, --show-number::
  61        Show line number in the original commit (Default: off).
  62
  63-p, --porcelain::
  64        Show in a format designed for machine consumption.
  65
  66-M::
  67        Detect moving lines in the file as well.  When a commit
  68        moves a block of lines in a file (e.g. the original file
  69        has A and then B, and the commit changes it to B and
  70        then A), traditional 'blame' algorithm typically blames
  71        the lines that were moved up (i.e. B) to the parent and
  72        assigns blame to the lines that were moved down (i.e. A)
  73        to the child commit.  With this option, both groups of
  74        lines are blamed on the parent.
  75
  76-h, --help::
  77        Show help message.
  78
  79
  80THE PORCELAIN FORMAT
  81--------------------
  82
  83In this format, each line is output after a header; the
  84header at the minumum has the first line which has:
  85
  86- 40-byte SHA-1 of the commit the line is attributed to;
  87- the line number of the line in the original file;
  88- the line number of the line in the final file;
  89- on a line that starts a group of line from a different
  90  commit than the previous one, the number of lines in this
  91  group.  On subsequent lines this field is absent.
  92
  93This header line is followed by the following information
  94at least once for each commit:
  95
  96- author name ("author"), email ("author-mail"), time
  97  ("author-time"), and timezone ("author-tz"); similarly
  98  for committer.
  99- filename in the commit the line is attributed to.
 100- the first line of the commit log message ("summary").
 101
 102The contents of the actual line is output after the above
 103header, prefixed by a TAB. This is to allow adding more
 104header elements later.
 105
 106SEE ALSO
 107--------
 108gitlink:git-blame[1]
 109
 110AUTHOR
 111------
 112Written by Junio C Hamano <junkio@cox.net>
 113
 114GIT
 115---
 116Part of the gitlink:git[7] suite