Information Technology Reference
In-Depth Information
1. Create a new file
d1.txt
with
$ echo d1 > d1.txt
2. Commit the snapshot with
$ git snapshot d1
3. Create a new file
d2.txt
with
$ echo d2 > d2.txt
4. Commit the snapshot with
$ git snapshot d2
5. Create a new file
d3.txt
with
$ echo d3 > d3.txt
6. Commit the snapshot with the $ git snapshot d3 command.
The repository now looks like
Figure 5-4
.
Figure 5-4
.
The repository from Recipe 5-1 with revisions d1, d2, and d3
To create the next branch you can use three commands:
# switch to master branch
$ git checkout master
# create a new branch named info
# pointing to the same commit as master branch
$ git branch info