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
[REVISION] . In Figure 5-8 , the reference: doc 4 points to the revision labeled as
m2 , while master 2 , info 5 , and doc 5 all point to m1 . All ancestor references
for the branches info , doc , and master are shown in Figure 5-13 .
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 .
 
 
 
Search WWH ::




Custom Search