git annoyances: git fetch does nothing; git pull works?

Robert Shearman rob at codeweavers.com
Thu Jul 13 13:50:42 CDT 2006


Jeremy White wrote:

>Dan Kegel wrote:
>  
>
>>On 7/12/06, Marcus Meissner <marcus at jet.franken.de> wrote:
>>
>>    
>>
>>>>OK, call me a git, but
>>>>  git fetch
>>>>doesn't grab the latest changes, while
>>>>  git pull
>>>>        
>>>>
>
>My understanding is that git fetch only operates
>on the underlying database of source objects, but does
>not change the currently checked out branch.
>
>The pattern I always followed was:
>  git fetch <source-server>
>     (retrieve new objects from a source)
>  git rebase <source-branch> <my-current-branch>
>     (change my current branch by applying new
>      patches from the source-branch).
>
>e.g.
>  git fetch winehq
>  git rebase winehq master
>
>I gather some folks do prefer to use pull; I don't
>understand the difference, to be honest.
>  
>

git pull prevents you using git-format-patch to send the patches back.

Also note that "git fetch" will automatically forward your current 
branch to the latest version if you have no patches in the current 
branch, so if you then try to rebase you will get a message saying 
"nothing to do".

If that happens, you should get a message from "git fetch" saying 
something like "fast-forward..."

-- 
Rob Shearman




More information about the wine-devel mailing list