Information Technology Reference
In-Depth Information
How It Works
The option --no-ff of the $ git merge command changes the default behavior
forcing the creation of a merge commit even if the merge can be performed as a fast-
forward. Working this way you retain the information that the commits f1 , f2 , and f3
are related with each other. They all deal with the same aspect of development and to-
gether constitute a complete piece of work. If, for any reason, you need to revert or
copy the whole branch into some other place in history, having commits organized like
this will make the operation easier.
6-7. Diverging multiple branches
Problem
You want to create the repository shown in Figure 6-12 . It contains five branches that
have diverged. Notice that the actual order in which the revisions were created is not
important. The figure presents revisions from different branches as created at exactly
the same moment, which as we know is not true. You are working alone, and all your
revisions are created sequentially, one at the time, not parallel. But the role of the im-
age is to underline, that the procedure described in Recipe 6-7 works well, no matter
what the order of your commits.
Figure 6-12 . The repository with five divergent branches
 
 
Search WWH ::




Custom Search