# git pull origin doesn't update the master

6 messages from 2006-04-10 to 2006-04-10. Participants: Aneesh Kumar, sean, Junio C Hamano.
Thread: https://gitlist.dev/t/3843

## Aneesh Kumar, 2006-04-10 04:41

Subject: git pull origin doesn't update the master
Message-ID: <cc723f590604092141q3517136cmc0a895a069021b8f@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590604092141q3517136cmc0a895a069021b8f%40mail.gmail.com

```
While updating the git code base the master branch is not getting
updated. First look tell me that the below commit is the issue
a9698bb22fb7b66e5882c3a5e7b2b8b53ea03f90

git-pull.sh does
git-fetch --update-head-ok "$@" || exit 1

and git-fetch.sh exit with status 1 printing the below message

* refs/heads/pu: does not fast forward to branch 'pu' of
http://git.kernel.org/pub/scm/git/git;
  not updating.


-aneesh

```

## Aneesh Kumar, 2006-04-10 04:51

Subject: Re: git pull origin doesn't update the master
Message-ID: <cc723f590604092151p7c8c44e3g14decc09c0e24383@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590604092151p7c8c44e3g14decc09c0e24383%40mail.gmail.com
In-Reply-To: <cc723f590604092141q3517136cmc0a895a069021b8f@mail.gmail.com>

```
On 4/10/06, Aneesh Kumar <aneesh.kumar@gmail.com> wrote:
> While updating the git code base the master branch is not getting
> updated. First look tell me that the below commit is the issue
> a9698bb22fb7b66e5882c3a5e7b2b8b53ea03f90
>
> git-pull.sh does
> git-fetch --update-head-ok "$@" || exit 1
>
> and git-fetch.sh exit with status 1 printing the below message
>
> * refs/heads/pu: does not fast forward to branch 'pu' of
> http://git.kernel.org/pub/scm/git/git;
>   not updating.
>
>


I think the git-update-server-info is not run on kernel.org. I am
using the http fetch

562036a04223709de4922873238462007bcb529f	refs/heads/pu
$ more pu
c52d221ba03c84e0b818d19f7ec30cb4d75fe509
$

-aneesh

```

## sean, 2006-04-10 05:03

Subject: Re: git pull origin doesn't update the master
Message-ID: <BAYC1-PASMTP11D3D1D967525A6F029F85AECC0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP11D3D1D967525A6F029F85AECC0%40CEZ.ICE
In-Reply-To: <cc723f590604092141q3517136cmc0a895a069021b8f@mail.gmail.com>

```
On Mon, 10 Apr 2006 10:11:05 +0530
"Aneesh Kumar" <aneesh.kumar@gmail.com> wrote:

> While updating the git code base the master branch is not getting
> updated. First look tell me that the below commit is the issue
> a9698bb22fb7b66e5882c3a5e7b2b8b53ea03f90
> 
> git-pull.sh does
> git-fetch --update-head-ok "$@" || exit 1
> 
> and git-fetch.sh exit with status 1 printing the below message
> 
> * refs/heads/pu: does not fast forward to branch 'pu' of
> http://git.kernel.org/pub/scm/git/git;
>   not updating.
> 

The "pu" branch often won't fast forward because some commits have
been completely deleted in it since the last time you pulled.

If you want to track it, add a plus (+) sign to the proper line in 
your .git/remotes/origin file, like this:

Pull: +refs/heads/pu:refs/heads/pu

Which tells git to deal with the problem for you by merging instead
of fast forwarding.   Or you can just delete that line completely
if you don't want to track the pu branch at all.

HTH,
Sean

```

## Junio C Hamano, 2006-04-10 06:29

Subject: Re: git pull origin doesn't update the master
Message-ID: <7vr7469c4n.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vr7469c4n.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <cc723f590604092141q3517136cmc0a895a069021b8f@mail.gmail.com>

```
"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:

> While updating the git code base the master branch is not getting
> updated. First look tell me that the below commit is the issue
> a9698bb22fb7b66e5882c3a5e7b2b8b53ea03f90
>
> git-pull.sh does
> git-fetch --update-head-ok "$@" || exit 1

Yes, this was done as an response to an explicit request from
Andrew Morten.

What Sean said about "pu" branch is correct.

```

## Aneesh Kumar, 2006-04-10 06:45

Subject: Re: git pull origin doesn't update the master
Message-ID: <cc723f590604092345r7d0e2cedr8f9838d054ecb023@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590604092345r7d0e2cedr8f9838d054ecb023%40mail.gmail.com
In-Reply-To: <7vr7469c4n.fsf@assigned-by-dhcp.cox.net>

```
On 4/10/06, Junio C Hamano <junkio@cox.net> wrote:
> "Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
>
> > While updating the git code base the master branch is not getting
> > updated. First look tell me that the below commit is the issue
> > a9698bb22fb7b66e5882c3a5e7b2b8b53ea03f90
> >
> > git-pull.sh does
> > git-fetch --update-head-ok "$@" || exit 1
>
> Yes, this was done as an response to an explicit request from
> Andrew Morten.
>
> What Sean said about "pu" branch is correct.
>
>
Sean suggestion worked for me.

Work flow is now a bit complicated. I clone the repository. Now i need
to edit remotes/origin to make sure what all branches i need to
follow. And then do a git pull origin. Earlier i just need to do a
clone and a git pull. I don't need to fast forward pu branch. But then
i need to get the update of master branch. since git-fetch fails
update pu branch git pull origin fails to update master branch also
which i am really interested.

-aneesh

```

## Junio C Hamano, 2006-04-10 07:24

Subject: Re: git pull origin doesn't update the master
Message-ID: <7vmzetao5h.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vmzetao5h.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <cc723f590604092345r7d0e2cedr8f9838d054ecb023@mail.gmail.com>

```
"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:

> Work flow is now a bit complicated. I clone the repository. Now i need
> to edit remotes/origin to make sure what all branches i need to
> follow. And then do a git pull origin. Earlier i just need to do a
> clone and a git pull. I don't need to fast forward pu branch.

What you are saying is that the previous round did a wrong thing
without telling the user, and it just happened that you did not
care about the wrong thing it did.

It is a gentle reminder that heads that are rewound need to be
advertised as such.  It is conceivable that in future versions
of git we might want to be able to mark some branches "this is
expected to be rewound" explicitly and make the clone operation
to take notice, to give you the plus sign automatically.

```
