Information Technology Reference
In-Depth Information
Listing 3-8. The output of git reflog after the first commit
bb057dd HEAD@{0}: commit (initial): lorem
It informs you that the revision with the comment lorem can now be referred to as:
bb057dd
or
HEAD@{0 }.
Let's create the second revision:
$ echo ipsum > ipsum.txt
$ git snapshot ipsum
Currently the repository contains two revisions with the comments lorem and
ipsum . The command:
$ git reflog
now returns the output shown in Listing 3-9 .
Listing 3-9. The output of a git reflog after the second commit
227c9fb HEAD@{0}: commit: ipsum
bb057dd HEAD@{1}: commit (initial): lorem
What happened? We moved from revision lorem to revision ipsum in the history.
The current revision can be addressed as HEAD@{0} —right now it is the revision
ipsum . The previous revision—which is lorem —can be referred to as HEAD@{1} .
Create the third revision:
$ echo dolor > dolor.txt
$ git snapshot dolor
and execute:
 
 
 
Search WWH ::




Custom Search