Reputation: 407
May anyone tell me what happended between 0ab11dd and bd7278a? And also between 27ac7b7 and 95b2c48? Why there is crossover in those commits?
* xxxxxxx (HEAD -> f-1, origin/f-1)
* xxxxxxx fix merge conflicts
* 13751d5 Merge branch 'master' into feature/DP-1
|\
| * f3efc9d (origin/master, origin/HEAD, master) Merge pull request #9 from fix
| |\
| | * 83c0b15 (origin/fix)
| |/
| * be24ce6 Merge pull request
| |\
| | * 0ab11dd merge
| | |\
| | |/
| |/|
| * | bd7278a Merge pull request
| |\ \
| | * | 14399e2
| | | * xxxxxxx
| | | * xxxxxxx
| | | * 27ac7b7 merge
| | | |\
| | |_|/
| |/| |
| | | * 95b2c48 (origin/f-3)
| | | * xxxxxxx
especially this
| | |_|/
| |/| |
why there is an out branch but no commit?
Upvotes: 1
Views: 99
Reputation: 490108
This would be a comment, but there's not room and it needs formatting.
The section at this point:
| | | * 27ac7b7 merge
| | | |\
| | |_|/
| |/| |
| | | * 95b2c48 (origin/f-3)
| | | * xxxxxxx
is incomplete. If you keep going through the graph, it may eventually resolve itself like this:
| | | * xxxxxxx
| | |/
| | * yyyyyyy
| |/
| * zzzzzzz
|/
* sssssss
(but we can't really guess and it's probably much more complicated than that).
With enough additional graph we can say more about commit 27ac7b7
. At the moment all we know is that it is a merge, with two parents, and the first parent is 95b2c48
(which is labeled origin/f-3
). We cannot see the second parent commit's hash ID here, but following the graph line, you would eventually arrive at the second parent.
(The first commit you asked about—0ab11dd
—is a merge commit with parents xxxxxxx
, the result of following the direct-downward line to that commit, and commit bd7278a
, the result of following the line that initially descends rightward then immediately reverses and crosses down to bd7278a
. git log --graph
emphasizes the first/not-first relationships of parentage by drawing the not-first links out towards the right. Some graph drawing methods, including the one I usually use, don't make the distinction at all. When and whether the distinction is useful is another topic, but see the --first-parent
option to git log
.)
Upvotes: 1
Reputation: 22065
About the "crossovers"
This is just the way the graphic tool represents merges : from right to left (the one on the left being the one "receiving" the merge). So when a commit series (rather than say branch which may be confusing here) has to be merged into another which happens to be currently graphically represented to its right, then the tool draws a line which, yes, crosses the other ones to make its junction to the merge commit from the right.
So it's just a graphical convention.
About the vertical lines (after comments)
Branches are (optionnally, with --decorate) added to the graph at the commit they're currently pointing to, but don't forget that your repo tree doesn't really need any of them. These commit series are the body of your tree, where "branches" are in fact just the tips, that's where the metaphor breaks down a little bit...
(I grant you that it's a very low-tech representation, ...but let's also admit that informative commit messages would make things way clearer.)
Upvotes: 1