# Re: problems getting uptodate from a remote repository

3 messages from 2009-05-19 to 2009-05-19. Participants: Aaron Gray, Sverre Rabbelier, Robert Haines.
Thread: https://gitlist.dev/t/19416

## Aaron Gray, 2009-05-19 16:09

Subject: Re: problems getting uptodate from a remote repository
Message-ID: <9719867c0905190909q74e4a6b9r4857fb6f32ff394@mail.gmail.com>
URL: https://gitlist.dev/e/9719867c0905190909q74e4a6b9r4857fb6f32ff394%40mail.gmail.com
In-Reply-To: <9719867c0905190908n2364da92s88ad646e8667298c@mail.gmail.com>

```
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

```

## Robert Haines, 2009-05-19 17:03

Subject: Re: problems getting uptodate from a remote repository
Message-ID: <ADB06DB0-9198-4AB4-8BE8-6472B943C872@manchester.ac.uk>
URL: https://gitlist.dev/e/ADB06DB0-9198-4AB4-8BE8-6472B943C872%40manchester.ac.uk
In-Reply-To: <9719867c0905190909q74e4a6b9r4857fb6f32ff394@mail.gmail.com>

```
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

```

## Sverre Rabbelier, 2009-05-19 17:19

Subject: Re: problems getting uptodate from a remote repository
Message-ID: <fabb9a1e0905191019j73067de9h3ecf3f9dd9ab44e4@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0905191019j73067de9h3ecf3f9dd9ab44e4%40mail.gmail.com
In-Reply-To: <9719867c0905190909q74e4a6b9r4857fb6f32ff394@mail.gmail.com>

```
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

```
