Re: branch ahead in commits but push claims all up to date
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Mar 26, 2009, 12:48 UTC
- Message-ID
- <20090326124816.GB3114@atjola.homenet>
- In-Reply-To
- <43d8ce650903251905p6f9798f5u79be7dff3b118d5c@mail.gmail.com>
On 2009.03.26 02:05:21 +0000, John Tapsell wrote:
Show 11 quoted lines
> 2009/3/25 Irene Ros <imirene@gmail.com>: > > Thank you for the explanation, doing a git fetch actually did do the > > trick although I still don't quite see the difference between > > git pull origin myBranch > > and > > git fetch > > git pull origin myBranch is equivalent to two commands: > > git fetch > git merge origin/myBranch
No. If that was the case, the remote tracking branches would be updated by the "git fetch" part. And there wouldn't be a difference between the two commands WRT the handling of remote tracking branches.
git pull origin myBranch does something like:
git fetch origin myBranch git merge FETCH_HEAD
The remote and the refspec are passed to "git fetch" by "git pull". So because there's an explicit refspec, the default value from the config is not used. And because the refspec has no right side, things get stored to FETCH_HEAD.
Björn