git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: problems getting uptodate from a remote repository
       [not found] ` <9719867c0905190908n2364da92s88ad646e8667298c@mail.gmail.com>
@ 2009-05-19 16:09   ` Aaron Gray
  2009-05-19 17:03     ` Robert Haines
  2009-05-19 17:19     ` Sverre Rabbelier
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron Gray @ 2009-05-19 16:09 UTC (permalink / raw)
  To: git

I have done a 'git fetch' but the repo is not being updated to latest changes.

I am getting the message :-

    "Your branch is behind 'origin/master' by 53 commits, and can be
fast-forwarded.

when I do a 'git checkout master'

What is going on here and what can I do about it ?

Here's my config :-

$ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.url=git://git.cybercomms.org/llvm/trunk/.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

Many thanks in advance,

Aaron

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems getting uptodate from a remote repository
  2009-05-19 16:09   ` problems getting uptodate from a remote repository Aaron Gray
@ 2009-05-19 17:03     ` Robert Haines
  2009-05-19 17:19     ` Sverre Rabbelier
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Haines @ 2009-05-19 17:03 UTC (permalink / raw)
  To: Aaron Gray; +Cc: git

Hi Aaron,

On 19 May 2009, at 17:09, Aaron Gray wrote:

> I have done a 'git fetch' but the repo is not being updated to  
> latest changes.
>
> I am getting the message :-
>
>    "Your branch is behind 'origin/master' by 53 commits, and can be
> fast-forwarded.
>
> when I do a 'git checkout master'
>
> What is going on here and what can I do about it ?


<snip config>

A fetch just updates your remote tracking branches in your local  
repository, it doesn't merge them as well. To update your local master  
you would then do (while on branch master):

$ git merge origin/master

This extra step allows you to create a new branch with origin/master  
as its start point to check that you're happy with the updates before  
you update your local master should you wish to do so.

Cheers,
Rob

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems getting uptodate from a remote repository
  2009-05-19 16:09   ` problems getting uptodate from a remote repository Aaron Gray
  2009-05-19 17:03     ` Robert Haines
@ 2009-05-19 17:19     ` Sverre Rabbelier
  1 sibling, 0 replies; 3+ messages in thread
From: Sverre Rabbelier @ 2009-05-19 17:19 UTC (permalink / raw)
  To: Aaron Gray; +Cc: git

Heya,

On Tue, May 19, 2009 at 18:09, Aaron Gray
<aaronngray.lists@googlemail.com> wrote:
> I have done a 'git fetch' but the repo is not being updated to latest changes.

Fetch only 'fetches' the data, it doesn't update your working copy. To
get your working copy up to date you can do 'git merge origin' after
you do 'git fetch origin'. That is such a common operation that there
is a single command that does just that, 'git pull origin' will do
what you want :).

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-19 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <33710F9891EA4BFD8ACD60798E354138@HPLAPTOP>
     [not found] ` <9719867c0905190908n2364da92s88ad646e8667298c@mail.gmail.com>
2009-05-19 16:09   ` problems getting uptodate from a remote repository Aaron Gray
2009-05-19 17:03     ` Robert Haines
2009-05-19 17:19     ` Sverre Rabbelier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).