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:25 UTC
Message-ID
<17941.1753.893556.725405@lisa.zopyra.com>
In-Reply-To
<17941.655.192938.792088@lisa.zopyra.com>
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.
Bill
Previous: Bill LearNext: Jeff King
Message 4 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.