Re: git pull versus fetch/merge

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rene Herman <rene.herman@...>
Cc: <git@...>, Takashi Iwai <tiwai@...>
Date: Monday, July 21, 2008 - 6:23 am

On 2008.07.21 11:11:50 +0200, Rene Herman wrote:

"git pull remote branch" does "git fetch remote branch". That only
fetches that single branch and stores it in FETCH_HEAD. The merge part
then merges what is in FETCH_HEAD into your current branch.


The rejected branches had their history rewritten since your last fetch.
Git rejects to update your remote tracking branches in that case. The
history rewriting might have been an accident, or it might have been
intentional. Only the owner of that repo is able to tell that.

You can use -f to force the updates.


Your fetch/merge approach was different from what your pull approach
did. tiwai/devel did not get updated by the fetch, which means that you
tried to merge the old state of that branch and that caused some
conflicts. OTOH the pull did fetch the latest state from the remote repo
and merged that cleanly.

Your fetch/merge approach was more like "git pull" without any
arguments, but with the current branch setup to track tiwai/devel. In
that case, pull really does a "git fetch tiwai", and it should fail in
the same way.

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git pull versus fetch/merge, Rene Herman, (Mon Jul 21, 5:11 am)
Re: git pull versus fetch/merge, Björn, (Mon Jul 21, 6:23 am)
Re: git pull versus fetch/merge, Rene Herman, (Mon Jul 21, 6:58 am)
Re: git pull versus fetch/merge, Jeff King, (Mon Jul 21, 7:09 am)
Re: git pull versus fetch/merge, Rene Herman, (Mon Jul 21, 7:30 am)
Re: git pull versus fetch/merge, Björn, (Mon Jul 21, 7:33 am)
Re: git pull versus fetch/merge, Rene Herman, (Mon Jul 21, 7:39 am)
Re: git pull versus fetch/merge, Jeff King, (Mon Jul 21, 7:09 am)