threads / discuss / 3843

git pull origin doesn't update the master

Subject: git pull origin doesn't update the master

## tl;dr

6 messages between Apr 10, 2006 and Apr 10, 2006.

replies: 5people: 3as markdown or json

Aneesh Kumar· Apr 10, 2006, 04:41 UTC · lore

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· Apr 10, 2006, 04:51 UTC · re: Aneesh Kumar · lore

Re: git pull origin doesn't update the master

On 4/10/06, Aneesh Kumar <aneesh.kumar@gmail.com> wrote:
Show 14 quoted lines
> 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· Apr 10, 2006, 05:03 UTC · re: Aneesh Kumar · lore

Re: git pull origin doesn't update the master

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

Show 13 quoted lines
> 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· Apr 10, 2006, 06:29 UTC · re: Aneesh Kumar · lore

Re: git pull origin doesn't update the master

"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
Show 6 quoted lines
> 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· Apr 10, 2006, 06:45 UTC · re: Junio C Hamano · lore

Re: git pull origin doesn't update the master

On 4/10/06, Junio C Hamano <junkio@cox.net> wrote:
Show 15 quoted lines
> "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· Apr 10, 2006, 07:24 UTC · re: Aneesh Kumar · lore

Re: git pull origin doesn't update the master

"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.

← back to recent threads