Re: branch ahead in commits but push claims all up to date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009.03.26 02:05:21 +0000, John Tapsell wrote:
> 2009/3/25 Irene Ros <imirene@xxxxxxxxx>:
> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux