McCullough and Berglund on Mastering Advanced Git

Errata for McCullough and Berglund on Mastering Advanced Git

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date Submitted
Other Digital Version Chapter 9
Timecode 03:40

Starting at around 03:40 of Chapter 9 "Refspec", Matthew and Tim intend to show the effects of a '+' in front of the refspec at a 'git pull'. They explain that the '+' forces the destination to be overridden by the source, but in their demonstration one can clearly see that really there is a merge happening. From what I've found out, the '+' in the refspec is equivalent to the '--force' option and indeed has the desired effect. However, the problem here is caused by the comment "I'm gonna cheat. I don't need to specify both sides." (04:11) and the resulting shorthand notation: If you want to force a 'git pull', you in fact have to explicitly specify both sides using the complete '+<source>:<destination>' format. Therefore, commands that have the favored and explained effect are: * git pull --force origin master:master * git pull origin +master:master What actually doesn't work here: * git pull --force origin master * git pull origin +master (as seen in the video) * git pull --force Those commands have the same effect as a simple 'git pull' in this case: They result in a merge.

Felix Dreissig (noris network AG)  Mar 19, 2012