Skip to main content


annotate | blame | an

show per-line commit information for given files

Show file contents where each line is annotated with information about the commit that last changed that line.

This command is useful for discovering when a change was made and by whom.

If you include --file, --user, or --date, the revision number is suppressed unless you also include --number.

Without the -a/--text option, annotate will skip binary files. With -a, binary files will be annotated anyway.

Returns 0 on success.


-r--revannotate the specified revision
--no-followfalsedon't follow copies and renames
-a--texttreat all files as text
-u--userlist the author (long with -v)
-f--filelist the filename
-d--datelist the date (short with -q)
-n--numberlist the revision number
-c--changesetlist the changeset (default)
-l--line-numbershow line number at the first appearance
-w--ignore-all-spaceignore white space when comparing lines
-b--ignore-space-changeignore changes in the amount of white space
-B--ignore-blank-linesignore changes whose lines are all blank
-Z--ignore-space-at-eolignore changes in whitespace at EOL
-I--includeinclude files matching the given patterns
-X--excludeexclude files matching the given patterns
-p--phabdifflist phabricator diff id