Information Technology Reference
In-Depth Information
Moreover, you can append a number after the tilde—it allows us to point to older
ancestors. The reference
[REVISION]
∼
n
points to the n-th ancestor of
m2
, while
master
∼
2
,
info
∼
5
, and
doc
∼
5
all point to
m1
. All ancestor references
Figure 5-13
.
Ancestor references for branches doc, info, and master
Hint
References
[REVISION]
∼
1
and
[REVISION]
∼
mean exactly the same: the
first parent of a given revision.
You learned in Recipe 5-1 that your current revision could always be referenced by
symbolic reference
HEAD
. As you can guess
HEAD
can be used in conjunction with
ancestor references such as
HEAD
∼
,
HEAD
∼
2
,
HEAD
∼
3
, and so forth. If you switch to
the
info
branch with
$ git checkout info
, then using
HEAD
with a tilde
would give the results presented in
Figure 5-14
.