Information Technology Reference
In-Depth Information
a. Switch to
b
branch with
$ git checkout b
b. Create the image displaying a dog and save it in the file
named
picture.jpg
c. Commit the change with
$ git snapshot Dog
Finish the recipe with the
$ git checkout a
command.
How It Works
This time the repository contains two different images saved in files with the same
name. The file stored in the branch named
a
displays a cat, and the file stored in
b
branch displays a dog.
Notice that the command
$ git commit --allow-empty --allow-
empty-message -m " "
produces the empty commit with the empty message.
9-5. Resolving a binary conflict during
merging
Problem
You want to merge branches
a
and
b
created in Recipe 9-4 with the
$ git merge
command. You want to obtain the repository shown in
Figure 9-5
. The repository after
the merge should contain the
picture.jpg
file from
b
branch.