Information Technology Reference
In-Depth Information
Now if you list the branches with the
$ git branch
command, you will notice
that the repository contains two branches listed as:
doc
* master
The asterisk denotes a current branch. It means that you are still in the
master
branch. The repository now looks like
Figure 5-3
.
Figure 5-3
.
The repository from Recipe 5-1 with the two branches master and doc
Now you need to create three revisions on the branch named
doc
. First, you have to
switch to this branch with the command:
$ git checkout doc
Right now the command:
$ git branch
prints:
* doc
master
The above output informs you that you currently are on branch named
doc
. Your
commits will now go to this new branch. You can create three commits
d1
,
d2
, and
d3
with the following procedure: