Information Technology Reference
In-Depth Information
2. Commit the snapshot with
$ git snapshot i1
3. Create a new file
i2.txt
with
$ echo i2 > i2.txt
4. Commit the snapshot with
$ git snapshot i2
5. Create a new file
i3.txt
with
$ echo i3 > i3.txt
6. Commit the snapshot with
$ git snapshot i3
The repository is finished. It looks like
Figure 5-1
. You can verify it with the follow-
ing command:
$ gitk --all &
figure the name of the current branch is written in bold font, and the current revision is
denoted with a white dot. On your screen the dot will be yellow—that's the convention
gitk
uses by default.
Figure 5-6
.
The repository from Recipe 5-1 drawn with the gitk application
The diagram similar to the one presented in
Figure 5-6
can be printed with the
$
git log
command using additional switches:
$ git log --oneline --graph --decorate --all
The output of the above command will be similar to: