Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git branching example from Pro Git

I'm going through the Pro Git book, trying to get my head around branching and merging in DVCS. So far it's been a great resource, but I'm having a little trouble with this section.

In Figure 3-8, we have the following:

enter image description here

The testing branch points to c2b9e, fine.

But then the author checks out master, commits a change, and suddenly it's master that's pointing to c2b9e, rather than testing:

enter image description here

I was expecting it to result in

HEAD -> master -> some_new_SHA -> f30ab

and

testing -> c2b9e -> f30ab

I'm having one of those "there's a bug in the compiler!" moments with this. There almost never is a bug in the compiler (the bug's in our own code, of course), so please help me see the error of my ways with this.

like image 236
George Armhold Avatar asked Jul 28 '11 21:07

George Armhold


1 Answers

This is a bug in the illustration. Swap c2b9e and 87ab2 in the illustration and it's correct.

like image 87
antlersoft Avatar answered Sep 21 '22 14:09

antlersoft