1GIT-NAME-REV(1) Git Manual GIT-NAME-REV(1)
2
3
4
6 git-name-rev - Find symbolic names for given revs
7
9 git-name-rev [--tags] [--refs=<pattern>]
10 ( --all | --stdin | <committish>... )
11
13 Finds symbolic names suitable for human digestion for revisions given
14 in any format parsable by git-rev-parse.
15
17 --tags
18 Do not use branch names, but only tags to name the commits
19
20 --refs=<pattern>
21 Only use refs whose names match a given shell pattern.
22
23 --all
24 List all commits reachable from all refs
25
26 --stdin
27 Read from stdin, append "(<rev_name>)" to all sha1´s of nameable
28 commits, and pass to stdout
29
30 --name-only
31 Instead of printing both the SHA-1 and the name, print only the
32 name. If given with --tags the usual tag prefix of "tags/" is also
33 omitted from the name, matching the output of :git-describe(1) more
34 closely. This option cannot be combined with --stdin.
35
37 Given a commit, find out where it is relative to the local refs. Say
38 somebody wrote you about that fantastic commit
39 33db5f4d9027a10e477ccf054b2c1ab94f74c85a. Of course, you look into the
40 commit, but that only tells you what happened, but not the context.
41
42 Enter git-name-rev:
43
44
45
46 % git name-rev 33db5f4d9027a10e477ccf054b2c1ab94f74c85a
47 33db5f4d9027a10e477ccf054b2c1ab94f74c85a tags/v0.99^0~940
48
49 Now you are wiser, because you know that it happened 940 revisions
50 before v0.99.
51
52 Another nice thing you can do is:
53
54
55
56 % git log | git name-rev --stdin
57
58
60 Written by Johannes Schindelin <Johannes.Schindelin@gmx.de>
61
63 Documentation by Johannes Schindelin.
64
66 Part of the git(7) suite
67
68
69
70
71Git 1.5.3.3 10/09/2007 GIT-NAME-REV(1)