git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How can git pull be up-to-date and git push fail?

From
Bill Lear <rael@zopyra.com>
Date
Apr 5, 2007, 14:07 UTC
Message-ID
<17941.655.192938.792088@lisa.zopyra.com>
In-Reply-To
<20070405134954.GA18402@coredump.intra.peff.net>
On Thursday, April 5, 2007 at 09:49:54 (-0400) Jeff King writes:
Show 36 quoted lines
>On Thu, Apr 05, 2007 at 07:15:54AM -0500, Bill Lear wrote:
>
>> I'm trying to explain this behavior to a co-worker, and how to solve
>> it:
>> 
>> % git pull
>> Already up-to-date.
>> 
>> % git push
>> error: remote 'refs/remotes/origin/flexify' is not a strict subset of
>> localref 'refs/remotes/origin/flexify'. maybe you are not up-to-date
>> and need to pull first?
>
>That ref name is a bit suspect...why are you pushing your your remote
>tracking branches? If you are simply pushing to a repository that is a
>pure mirror, maybe your 'push' line in the config file should have a '+'
>at the front?
>
>At any rate, the reason why the pull doesn't fix it is that it is not
>pulling onto flexify, but onto master, which it looks like you guessed:
>
>> So, I'm confused: I would have thought the way you solve the problem
>> in step 2 is by executing step 1.  Would he need to do this:
>> 
>> % git checkout flexify
>> % git pull flexify:flexify
>> % git checkout master
>> % git push
>
>It would need to be:
>  git pull $remote flexify:flexify
>
>I don't think that works, though, because it's _not_ the flexify branch
>that's the problem. It's the refs/remotes/origin/flexify, which
>generally shouldn't be getting pushed at all. Can you show us the
>.git/config?
Here is the config for the remote repository:
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
[remote "origin"]
        url = git://source/fusion
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
Here is the local:
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = ssh://poire/home/jml/repos/new/fusion
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

Hmm.... I wonder if his remote repo is non-bare... I'll try to find out.

Bill
Previous: Jeff KingNext: Bill Lear
Message 3 of 13 in “How can git pull be up-to-date and git push fail?”
  1. Bill LearApr 5, 2007
  2. Jeff KingApr 5, 2007
  3. Bill LearApr 5, 2007
  4. Bill LearApr 5, 2007
  5. Jeff KingApr 5, 2007
  6. Bill LearApr 5, 2007
  7. Jeff KingApr 7, 2007
  8. Junio C HamanoApr 5, 2007
  9. Jeff KingApr 6, 2007
  10. Junio C HamanoApr 6, 2007
  11. Jeff KingApr 7, 2007
  12. Junio C HamanoApr 7, 2007
  13. Jeff KingApr 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.