Re: How can git pull be up-to-date and git push fail?
- From
Jeff King <peff@peff.net>
- Date
- Apr 5, 2007, 13:49 UTC
- Message-ID
- <20070405134954.GA18402@coredump.intra.peff.net>
- In-Reply-To
- <17940.59514.150325.738141@lisa.zopyra.com>
On Thu, Apr 05, 2007 at 07:15:54AM -0500, Bill Lear wrote:
Show 10 quoted lines
> 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:
Show 7 quoted lines
> 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?
-Peff