blob: 890b6649a787bafcdaa79f90d6272fe7f3aab7e1 [file] [log] [blame]
mgiuca@chromium.org81937562016-02-03 08:00:53 +00001git-hyper-blame(1)
2==================
3
4NAME
5----
6git-hyper-blame -
7include::_git-hyper-blame_desc.helper.txt[]
8
9SYNOPSIS
10--------
11[verse]
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000012'git hyper-blame' [-i <rev> [-i <rev> ...]] [--ignore-file=<file>]
13 [--no-default-ignores] [<rev>] [--] <file>
mgiuca@chromium.org81937562016-02-03 08:00:53 +000014
15DESCRIPTION
16-----------
17
18`git hyper-blame` is like `git blame` but it can ignore or "look through" a
19given set of commits, to find the real culprit.
20
21This is useful if you have a commit that makes sweeping changes that are
22unlikely to be what you are looking for in a blame, such as mass reformatting or
23renaming. By adding these commits to the hyper-blame ignore list, `git
24hyper-blame` will look past these commits to find the previous commit that
25touched a given line.
26
27Follows the normal `blame` syntax: annotates `<file>` with the revision that
28last modified each line. Optional `<rev>` specifies the revision of `<file>` to
29start from.
30
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000031Automatically looks for a file called `.git-blame-ignore-revs` in the repository
32root directory. This file has the same syntax as the `--ignore-file` argument,
33and any commits mentioned in this file are added to the ignore list.
34
mgiuca@chromium.org81937562016-02-03 08:00:53 +000035OPTIONS
36-------
37
38-i <rev>::
39 A revision to ignore. Can be specified as many times as needed.
40
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000041--ignore-file=<file>::
42 A file containing a list of revisions to ignore. Can have comments beginning
43 with `#`.
44
45--no-default-ignores::
46 Do not ignore commits from the `.git-blame-ignore-revs` file.
47
mgiuca@chromium.org81937562016-02-03 08:00:53 +000048EXAMPLE
49-------
50
51Let's run `git blame` on a file:
52
53demo:1[]
54
55Notice that almost the entire file has been blamed on a formatting change? You
56aren't interested in the uppercasing of the file. You want to know who
57wrote/modified those lines in the first place. Just tell `hyper-blame` to ignore
58that commit:
59
60demo:2[]
61
62`hyper-blame` places a `*` next to any line where it has skipped over an ignored
63commit, so you know that the line in question has been changed (by an ignored
64commit) since the given person wrote it.
65
mgiuca@chromium.org01d2cde2016-02-05 03:25:41 +000066CAVEATS
67-------
68
69When a line skips over an ignored commit, a guess is made as to which commit
70previously modified that line, but it is not always clear where the line came
71from. If the ignored commit makes lots of changes in close proximity, in
72particular adding/removing/reordering lines, then the wrong authors may be
73blamed for nearby edits.
74
75For this reason, `hyper-blame` works best when the ignored commits are be
76limited to minor changes such as formatting and renaming, not refactoring or
77other more invasive changes.
78
mgiuca@chromium.org81937562016-02-03 08:00:53 +000079SEE ALSO
80--------
81linkgit:git-blame[1]
82
83include::_footer.txt[]
84
85// vim: ft=asciidoc: