@@ -24,22 +24,22 @@ blobs contained in a commit.
24
24
object referenced by 'refs/heads/master'. If you
25
25
happen to have both 'heads/master' and 'tags/master', you can
26
26
explicitly say 'heads/master' to tell git which one you mean.
27
- When ambiguous, a '<name >' is disambiguated by taking the
27
+ When ambiguous, a '<refname >' is disambiguated by taking the
28
28
first match in the following rules:
29
29
30
- . If '$GIT_DIR/<name >' exists, that is what you mean (this is usually
30
+ . If '$GIT_DIR/<refname >' exists, that is what you mean (this is usually
31
31
useful only for 'HEAD', 'FETCH_HEAD', 'ORIG_HEAD', 'MERGE_HEAD'
32
32
and 'CHERRY_PICK_HEAD');
33
33
34
- . otherwise, 'refs/<name >' if it exists;
34
+ . otherwise, 'refs/<refname >' if it exists;
35
35
36
36
. otherwise, 'refs/tags/<refname>' if it exists;
37
37
38
- . otherwise, 'refs/heads/<name >' if it exists;
38
+ . otherwise, 'refs/heads/<refname >' if it exists;
39
39
40
- . otherwise, 'refs/remotes/<name >' if it exists;
40
+ . otherwise, 'refs/remotes/<refname >' if it exists;
41
41
42
- . otherwise, 'refs/remotes/<name >/HEAD' if it exists.
42
+ . otherwise, 'refs/remotes/<refname >/HEAD' if it exists.
43
43
+
44
44
'HEAD' names the commit on which you based the changes in the working tree.
45
45
'FETCH_HEAD' records the branch which you fetched from a remote repository
@@ -218,13 +218,44 @@ and its parent commits exist. The 'r1{caret}@' notation means all
218
218
parents of 'r1'. 'r1{caret}!' includes commit 'r1' but excludes
219
219
all of its parents.
220
220
221
+ To summarize:
222
+
223
+ '<rev>'::
224
+ Include commits that are reachable from (i.e. ancestors of)
225
+ <rev>.
226
+
227
+ '{caret}<rev>'::
228
+ Exclude commits that are reachable from (i.e. ancestors of)
229
+ <rev>.
230
+
231
+ '<rev1>..<rev2>'::
232
+ Include commits that are reachable from <rev2> but exclude
233
+ those that are reachable from <rev1>.
234
+
235
+ '<rev1>\...<rev2>'::
236
+ Include commits that are reachable from either <rev1> or
237
+ <rev2> but exclude those that are reachable from both.
238
+
239
+ '<rev>{caret}@', e.g. 'HEAD{caret}@'::
240
+ A suffix '{caret}' followed by an at sign is the same as listing
241
+ all parents of '<rev>' (meaning, include anything reachable from
242
+ its parents, but not the commit itself).
243
+
244
+ '<rev>{caret}!', e.g. 'HEAD{caret}!'::
245
+ A suffix '{caret}' followed by an exclamation mark is the same
246
+ as giving commit '<rev>' and then all its parents prefixed with
247
+ '{caret}' to exclude them (and their ancestors).
248
+
221
249
Here are a handful of examples:
222
250
223
251
D G H D
224
252
D F G H I J D F
225
253
^G D H D
226
254
^D B E I J F B
255
+ B..C C
227
256
B...C G H D E B C
228
257
^D B C E I J F B C
258
+ C I J F C
229
259
C^@ I J F
260
+ C^! C
230
261
F^! D G H D F
0 commit comments