@@ -7,10 +7,10 @@ git-describe - Give an object a human readable name based on an available ref
77
88SYNOPSIS
99--------
10- [verse ]
11- ' git describe' [-- all] [-- tags] [-- contains] [-- abbrev=<n >] [<commit-ish >... ]
12- ' git describe' [-- all] [-- tags] [-- contains] [-- abbrev=<n >] -- dirty[=<mark >]
13- ' git describe' <blob >
10+ [synopsis ]
11+ git describe [-- all] [-- tags] [-- contains] [-- abbrev=<n >] [<commit-ish >... ]
12+ git describe [-- all] [-- tags] [-- contains] [-- abbrev=<n >] -- dirty[=<mark >]
13+ git describe <blob >
1414
1515DESCRIPTION
1616-----------
@@ -22,70 +22,70 @@ abbreviated object name of the most recent commit. The result
2222is a "human-readable" object name which can also be used to
2323identify the commit to other git commands.
2424
25- By default (without -- all or -- tags) `git describe` only shows
25+ By default (without ` --all` or ` --tags` ) `git describe` only shows
2626annotated tags. For more information about creating annotated tags
27- see the -a and -s options to linkgit:git-tag[1].
27+ see the `-a` and `-s` options to linkgit:git-tag[1].
2828
2929If the given object refers to a blob, it will be described
3030as `<commit-ish>:<path>` , such that the blob can be found
31- at ` <path>` in the ` <commit-ish>` , which itself describes the
31+ at _ <path>_ in the _ <commit-ish>_ , which itself describes the
3232first commit in which this blob occurs in a reverse revision walk
33- from HEAD.
33+ from ` HEAD` .
3434
3535OPTIONS
3636-------
37- <commit-ish >... ::
38- Commit-ish object names to describe. Defaults to HEAD if omitted.
37+ ` <commit-ish>...` ::
38+ Commit-ish object names to describe. Defaults to ` HEAD` if omitted.
3939
40- -- dirty[=<mark >]::
41- -- broken[=<mark >]::
40+ ` --dirty[=<mark>]` ::
41+ ` --broken[=<mark>]` ::
4242 Describe the state of the working tree. When the working
43- tree matches HEAD, the output is the same as " git describe
44- HEAD". If the working tree has local modification " -dirty"
43+ tree matches ` HEAD` , the output is the same as ` git describe HEAD` .
44+ If the working tree has local modification, ` -dirty`
4545 is appended to it. If a repository is corrupt and Git
4646 cannot determine if there is local modification, Git will
47- error out, unless `--broken' is given, which appends
48- the suffix " -broken" instead.
47+ error out, unless `--broken` is given, which appends
48+ the suffix ` -broken` instead.
4949
50- -- all::
50+ ` --all` ::
5151 Instead of using only the annotated tags, use any ref
5252 found in `refs/` namespace. This option enables matching
5353 any known branch, remote-tracking branch, or lightweight tag.
5454
55- -- tags::
55+ ` --tags` ::
5656 Instead of using only the annotated tags, use any tag
5757 found in `refs/tags` namespace. This option enables matching
5858 a lightweight (non-annotated) tag.
5959
60- -- contains::
60+ ` --contains` ::
6161 Instead of finding the tag that predates the commit, find
6262 the tag that comes after the commit, and thus contains it.
63- Automatically implies -- tags.
63+ Automatically implies ` --tags` .
6464
65- -- abbrev=<n >::
65+ ` --abbrev=<n>` ::
6666 Instead of using the default number of hexadecimal digits (which
6767 will vary according to the number of objects in the repository with
68- a default of 7) of the abbreviated object name, use <n > digits, or
69- as many digits as needed to form a unique object name. An <n > of 0
68+ a default of 7) of the abbreviated object name, use _ <n>_ digits, or
69+ as many digits as needed to form a unique object name. An _ <n>_ of 0
7070 will suppress long format, only showing the closest tag.
7171
72- -- candidates=<n >::
72+ ` --candidates=<n>` ::
7373 Instead of considering only the 10 most recent tags as
7474 candidates to describe the input commit-ish consider
75- up to <n > candidates. Increasing <n > above 10 will take
75+ up to _ <n>_ candidates. Increasing _ <n>_ above 10 will take
7676 slightly longer but may produce a more accurate result.
77- An <n > of 0 will cause only exact matches to be output.
77+ An _ <n>_ of 0 will cause only exact matches to be output.
7878
79- -- exact-match::
79+ ` --exact-match` ::
8080 Only output exact matches (a tag directly references the
81- supplied commit). This is a synonym for -- candidates=0.
81+ supplied commit). This is a synonym for ` --candidates=0` .
8282
83- -- debug::
83+ ` --debug` ::
8484 Verbosely display information about the searching strategy
8585 being employed to standard error. The tag name will still
8686 be printed to standard out.
8787
88- -- long::
88+ ` --long` ::
8989 Always output the long format (the tag, the number of commits
9090 and the abbreviated commit name) even when it matches a tag.
9191 This is useful when you want to see parts of the commit object name
@@ -94,8 +94,8 @@ OPTIONS
9494 describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2
9595 that points at object deadbee.... ).
9696
97- -- match <pattern >::
98- Only consider tags matching the given `glob(7)` pattern,
97+ ` --match <pattern>` ::
98+ Only consider tags matching the given `glob` (7) pattern,
9999 excluding the "refs/tags/" prefix. If used with `--all` , it also
100100 considers local branches and remote-tracking references matching the
101101 pattern, excluding respectively "refs/heads/" and "refs/remotes/"
@@ -104,22 +104,22 @@ OPTIONS
104104 matching any of the patterns will be considered. Use `--no-match` to
105105 clear and reset the list of patterns.
106106
107- -- exclude <pattern >::
108- Do not consider tags matching the given `glob(7)` pattern, excluding
107+ ` --exclude <pattern>` ::
108+ Do not consider tags matching the given `glob` (7) pattern, excluding
109109 the "refs/tags/" prefix. If used with `--all` , it also does not consider
110110 local branches and remote-tracking references matching the pattern,
111- excluding respectively "refs/heads/" and "refs/remotes/" prefix;
111+ excluding respectively "` refs/heads/` " and "` refs/remotes/` " prefix;
112112 references of other types are never considered. If given multiple times,
113113 a list of patterns will be accumulated and tags matching any of the
114- patterns will be excluded. When combined with -- match a tag will be
115- considered when it matches at least one -- match pattern and does not
116- match any of the -- exclude patterns. Use `--no-exclude` to clear and
114+ patterns will be excluded. When combined with ` --match` a tag will be
115+ considered when it matches at least one ` --match` pattern and does not
116+ match any of the ` --exclude` patterns. Use `--no-exclude` to clear and
117117 reset the list of patterns.
118118
119- -- always::
119+ ` --always` ::
120120 Show uniquely abbreviated commit object as fallback.
121121
122- -- first-parent::
122+ ` --first-parent` ::
123123 Follow only the first parent commit upon seeing a merge commit.
124124 This is useful when you wish to not match tags on branches merged
125125 in the history of the target commit.
@@ -139,8 +139,8 @@ an abbreviated object name for the commit itself ("2414721")
139139at the end.
140140
141141The number of additional commits is the number
142- of commits which would be displayed by " git log v1.0.4..parent" .
143- The hash suffix is "-g " + an unambiguous abbreviation for the tip commit
142+ of commits which would be displayed by ` git log v1.0.4..parent` .
143+ The hash suffix is "`-g` " + an unambiguous abbreviation for the tip commit
144144of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The
145145length of the abbreviation scales as the repository grows, using the
146146approximate number of objects in the repository and a bit of math
@@ -149,12 +149,12 @@ The "g" prefix stands for "git" and is used to allow describing the version of
149149a software depending on the SCM the software is managed with. This is useful
150150in an environment where people may use different SCMs.
151151
152- Doing a ' git describe' on a tag-name will just show the tag name:
152+ Doing a ` git describe` on a tag-name will just show the tag name:
153153
154154 [torvalds@g5 git]$ git describe v1.0.4
155155 v1.0.4
156156
157- With --all, the command can use branch heads as references, so
157+ With ` --all` , the command can use branch heads as references, so
158158the output shows the reference path as well:
159159
160160 [torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2
@@ -163,7 +163,7 @@ the output shows the reference path as well:
163163 [torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^
164164 heads/lt/describe-7-g975b
165165
166- With --abbrev set to 0, the command can be used to find the
166+ With ` --abbrev` set to 0, the command can be used to find the
167167closest tagname without any suffix:
168168
169169 [torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2
@@ -179,13 +179,13 @@ be sufficient to disambiguate these commits.
179179SEARCH STRATEGY
180180---------------
181181
182- For each commit-ish supplied, ' git describe' will first look for
182+ For each commit-ish supplied, ` git describe` will first look for
183183a tag which tags exactly that commit. Annotated tags will always
184184be preferred over lightweight tags, and tags with newer dates will
185185always be preferred over tags with older dates. If an exact match
186186is found, its name will be output and searching will stop.
187187
188- If an exact match was not found, ' git describe' will walk back
188+ If an exact match was not found, ` git describe` will walk back
189189through the commit history to locate an ancestor commit which
190190has been tagged. The ancestor's tag will be output along with an
191191abbreviation of the input commit-ish's SHA-1. If `--first-parent` was
203203
204204Tree objects as well as tag objects not pointing at commits, cannot be described.
205205When describing blobs, the lightweight tags pointing at blobs are ignored,
206- but the blob is still described as <commit-ish>:<path> despite the lightweight
206+ but the blob is still described as ` <commit-ish>:<path>` despite the lightweight
207207tag being favorable.
208208
209209GIT
0 commit comments