Re: How can git pull be up-to-date and git push fail?
On Thursday, April 5, 2007 at 09:07:11 (-0500) Bill Lear writes:
>...
>Hmm.... I wonder if his remote repo is non-bare... I'll try to find
>out.
Yes, it is. Here is the reply I got from my friend:
Show 18 quoted lines
>Bill Lear writes:
> > So, the remote repo to which you pushed originally is non-bare? That
> > is, it has working files checked out?
>
>Correct.
>
> > If so, that is a problem, but
> > perhaps not the cause of your problems. Never push to a non-bare
> > repo: you need to go that repo and do a pull instead.
>
>I've been able to work around such problems. I know well about the
>double-commit reversal whammy that can happen (since it happened to me).
>If I push to a non-bare repo that's otherwise got no file modifications
>in it, I can do a "git status" to see what files it thinks are out of
>date, which tells me (by the file list) that the push succeeded. Then
>I just do a "git checkout -f" to sync up. Up til now, has worked like
>a charm. Alternately, I switch to some bogus temporary branch in the
>non-bare repo I'm pushing to & switch back after.