1GIT-ANNOTATE(1)                   Git Manual                   GIT-ANNOTATE(1)
2
3
4

NAME

6       git-annotate - Annotate file lines with commit info
7

SYNOPSIS

9       git-annotate [options] file [revision]
10

DESCRIPTION

12       Annotates each line in the given file with information from the commit
13       which introduced the line. Optionally annotate from a given revision.
14

OPTIONS

16       -b
17           Show blank SHA-1 for boundary commits. This can also be controlled
18           via the blame.blankboundary config option.
19
20       --root
21           Do not treat root commits as boundaries. This can also be
22           controlled via the blame.showroot config option.
23
24       --show-stats
25           Include additional statistics at the end of blame output.
26
27       -L <start>,<end>
28           Annotate only the given line range. <start> and <end> can take one
29           of these forms:
30
31
32           ·   number
33
34               If <start> or <end> is a number, it specifies an absolute line
35               number (lines count from 1).
36
37           ·   /regex/
38
39               This form will use the first line matching the given POSIX
40               regex. If <end> is a regex, it will search starting at the line
41               given by <start>.
42
43           ·   +offset or -offset
44
45               This is only valid for <end> and will specify a number of lines
46               before or after the line given by <start>.
47
48       -l
49           Show long rev (Default: off).
50
51       -t
52           Show raw timestamp (Default: off).
53
54       -S <revs-file>
55           Use revs from revs-file instead of calling git-rev-list(1).
56
57       -p, --porcelain
58           Show in a format designed for machine consumption.
59
60       --incremental
61           Show the result incrementally in a format designed for machine
62           consumption.
63
64       --contents <file>
65           When <rev> is not specified, the command annotates the changes
66           starting backwards from the working tree copy. This flag makes the
67           command pretend as if the working tree copy has the contents of he
68           named file (specify - to make the command read from the standard
69           input).
70
71       -M|<num>|
72           Detect moving lines in the file as well. When a commit moves a
73           block of lines in a file (e.g. the original file has A and then B,
74           and the commit changes it to B and then A), traditional blame
75           algorithm typically blames the lines that were moved up (i.e. B) to
76           the parent and assigns blame to the lines that were moved down
77           (i.e. A) to the child commit. With this option, both groups of
78           lines are blamed on the parent.
79
80           <num> is optional but it is the lower bound on the number of
81           alphanumeric characters that git must detect as moving within a
82           file for it to associate those lines with the parent commit.
83
84       -C|<num>|
85           In addition to -M, detect lines copied from other files that were
86           modified in the same commit. This is useful when you reorganize
87           your program and move code around across files. When this option is
88           given twice, the command looks for copies from all other files in
89           the parent for the commit that creates the file in addition.
90
91           <num> is optional but it is the lower bound on the number of
92           alphanumeric characters that git must detect as moving between
93           files for it to associate those lines with the parent commit.
94
95       -h, --help
96           Show help message.
97

SEE ALSO

99       git-blame(1)
100

AUTHOR

102       Written by Ryan Anderson <ryan@michonline.com>.
103

GIT

105       Part of the git(7) suite
106
107
108
109
110Git 1.5.3.3                       10/09/2007                   GIT-ANNOTATE(1)
Impressum