.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "GIT\-NAME\-REV" "1" "09/19/2007" "Git 1.5.3.2" "Git Manual" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" git\-name\-rev \- Find symbolic names for given revs .SH "SYNOPSIS" .sp .nf \fIgit\-name\-rev\fR [\-\-tags] [\-\-refs=] ( \-\-all | \-\-stdin | \&... ) .fi .SH "DESCRIPTION" Finds symbolic names suitable for human digestion for revisions given in any format parsable by git\-rev\-parse. .SH "OPTIONS" .TP \-\-tags Do not use branch names, but only tags to name the commits .TP \-\-refs= Only use refs whose names match a given shell pattern. .TP \-\-all List all commits reachable from all refs .TP \-\-stdin Read from stdin, append "()" to all sha1's of nameable commits, and pass to stdout .TP \-\-name\-only Instead of printing both the SHA\-1 and the name, print only the name. If given with \-\-tags the usual tag prefix of "tags/" is also omitted from the name, matching the output of \fB:git\-describe\fR(1) more closely. This option cannot be combined with \-\-stdin. .SH "EXAMPLE" Given a commit, find out where it is relative to the local refs. Say somebody wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a. Of course, you look into the commit, but that only tells you what happened, but not the context. Enter git\-name\-rev: .sp .nf .ft C % git name\-rev 33db5f4d9027a10e477ccf054b2c1ab94f74c85a 33db5f4d9027a10e477ccf054b2c1ab94f74c85a tags/v0.99^0~940 .ft .fi Now you are wiser, because you know that it happened 940 revisions before v0.99. Another nice thing you can do is: .sp .nf .ft C % git log | git name\-rev \-\-stdin .ft .fi .SH "AUTHOR" Written by Johannes Schindelin .SH "DOCUMENTATION" Documentation by Johannes Schindelin. .SH "GIT" Part of the \fBgit\fR(7) suite