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

Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date

From
Avery Pennarun <apenwarr@gmail.com>
Date
Aug 20, 2008, 21:22 UTC
Message-ID
<32541b130808201422l2b128beer142544ff91de5ca3@mail.gmail.com>
In-Reply-To
<7vbpznpeup.fsf@gitster.siamese.dyndns.org>
On Wed, Aug 20, 2008 at 5:15 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> "Avery Pennarun" <apenwarr@gmail.com> writes:
>
>> On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber <andreas.faerber@web.de> wrote:
>>> You need to name the local branch, not the remote one:
>>>
>>> $ git push origin mybranch
>>>
>>> It should then push to remotebranch.
>>
>> Not only that, but the "ahead of tracked branch" message depends on
>> your local copy of the remote branch, not the remote copy of the
>> remote branch.
>
> I think we have long been doing so.  Daniel, correct me.
...and I'm dumb.

I apologize. "git pull origin mybranch" does not update origin/mybranch. "git push origin mybranch" does.

It could be argued that pull should update the local reference too, but that's irrelevant at the moment.

Have fun,
Avery
Previous: Junio C HamanoNext: Daniel Barkalow
Message 6 of 13 in “Local branch ahead of tracked remote branch but git push claims everything up-to-date”
  1. ir0sAug 20, 2008
  2. Alex RiesenAug 20, 2008
  3. Andreas FärberAug 20, 2008
  4. Avery PennarunAug 20, 2008
  5. Junio C HamanoAug 20, 2008
  6. Avery PennarunAug 20, 2008
  7. Daniel BarkalowAug 20, 2008
  8. Junio C HamanoAug 20, 2008
  9. ir0sAug 21, 2008
  10. Michael J GruberAug 21, 2008
  11. ir0sAug 21, 2008
  12. Michael J GruberAug 22, 2008
  13. ir0sAug 21, 2008

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.