Information Technology Reference
In-Depth Information
| * | 4721211 The first commit by John
| |/
* | 4314f0a The first commit by Peter
|/
* ebb21d1 Initial commit
How It Works
The purpose of this recipe is very simple: I want to convince you that the solution
presented in Recipe 10-2 is not a pattern you should follow. The history created with
the $ git pull origin master command will be very difficult to read. Recipe
10-3 shows you that if a group of n developers work in parallel and every developer
creates exactly one commit, then the commit made by the first developer will generate
n-1 merge commits.
In our recipe the commit "The first commit by John" generated two
merges:
70984f8 Sarah merges...
192af3a Peter merges...
It is easy to realize that if the group consisted of n developers we would get n-1
merge commits.
Take a look at Listing 10-3 . The history shown was generated by only three com-
mits: one per developer. If your team consists of greater number of developers who
commit regularly then the command $ git pull origin master will produce
a very complicated graph of revisions with an enormous number of superfluous merge
commits.
Hint If you consider a clean history important you should treat Recipe 10-2 as a pat-
tern not to be followed.
10-4. Keeping the history linear
Problem
Search WWH ::




Custom Search