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

Re: Strange, can't push

From
Jeff King <peff@peff.net>
Date
Apr 22, 2009, 15:39 UTC
Message-ID
<20090422153951.GB12881@coredump.intra.peff.net>
In-Reply-To
<450196A1AAAE4B42A00A8B27A59278E70ACE04E4@EXCHANGE.trad.tradestation.com>
On Tue, Apr 21, 2009 at 05:21:15PM -0400, John Dlugosz wrote:
> Locally, the view in gitk, after fetching, is that branch B is one
> commit ahead of remotes/pub/B.  But doing a push doesn't advance it.
> Pushing to another label did get it there, under that name.

It's possible that the remote _is_ up-to-date, and your tracking refs are simply behind. Did you try fetching? If so, are you sure your fetch refspec will update the tracking ref appropriately?

Through what protocol are you pushing? Only the git protocol will update local tracking refs on push; http will not.

How are you invoking push? Are you using the remote name, so that it can find the tracking ref (pushing directly to the URL, even if you have a remote matching that URL, will not update tracking refs).

Finally, what version of git are you using? Recent versions of send-pack will update tracking refs for pushed _and_ up-to-date refs, but versions prior to 1.6.0.4 would only do so for things that actually got pushed.

-Peff
Previous: John DlugoszNext: John Dlugosz
Message 2 of 5 in “Strange, can't push”
  1. John DlugoszApr 21, 2009
  2. Jeff KingApr 22, 2009
  3. John DlugoszApr 22, 2009
  4. Kelly F. HickelApr 22, 2009
  5. John DlugoszApr 22, 2009

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.