NAME
git-annotate - Annotate file lines with commit information
SYNOPSIS
git annotate\n [<options>] [<rev-opts>] [<rev>] [--] <file>DESCRIPTION
Annotates each line in the given file with information from the commit which introduced the line. Optionally annotates from a given revision.
The only difference between this command and git-blame(1) is that they use slightly different output formats, and this command exists only for backward compatibility to support existing scripts, and provide a more familiar command name for people coming from other SCM systems.
OPTIONS
-b
--root
--show-stats
-L <start>,<end>, -L :<funcname>
<start> and <end> are optional. -L <start> or -L <start>, spans from <start> to end of file. -L ,<end> spans from start of file to <end>.
<start> and <end> can take one of these forms:
If <start> or <end> is a number, it specifies an absolute line number (lines count from 1).
This form will use the first line matching the given POSIX regex. If <start> is a regex, it will search from the end of the previous -L range, if any, otherwise from the start of file. If <start> is ^/regex/, it will search from the start of file. If <end> is a regex, it will search starting at the line given by <start>.
This is only valid for <end> and will specify a number of lines before or after the line given by <start>.
If :<funcname> is given in place of <start> and <end>, it is a regular expression that denotes the range from the first funcname line that matches <funcname>, up to the next funcname line. :<funcname> searches from the end of the previous -L range, if any, otherwise from the start of file. ^:<funcname> searches from the start of file. The function names are determined in the same way as git diff works out patch hunk headers (see Defining a custom hunk-header in gitattributes(5)).
-l
-t
-S <revs-file>
--reverse <rev>..<rev>
--first-parent
-p, --porcelain
--line-porcelain
--incremental
--encoding=<encoding>
--contents <file>
--date <format>
--[no-]progress
-M[<num>]
<num> is optional but it is the lower bound on the number of alphanumeric characters that Git must detect as moving/copying within a file for it to associate those lines with the parent commit. The default value is 20.
-C[<num>]
<num> is optional but it is the lower bound on the number of alphanumeric characters that Git must detect as moving/copying between files for it to associate those lines with the parent commit. And the default value is 40. If there are more than one -C options given, the <num> argument of the last -C will take effect.
--ignore-rev <rev>
--ignore-revs-file <file>
--color-lines
--color-by-age
-h
SEE ALSO
git-blame(1)
GIT
Part of the git(1) suite