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

Re: branch ahead in commits but push claims all up to date

From
Irene Ros <imirene@gmail.com>
Date
Mar 25, 2009, 02:01 UTC
Message-ID
<7001b7a00903241901w107e2973i9912eab114c9cde0@mail.gmail.com>
In-Reply-To
<alpine.LNX.1.00.0903242118270.19665@iabervon.org>
Hi All,

Thank you for the good advice. I may be the case I am somehow misusing git... I couldn't resolve the issue and so I created a new project off of the same repo. Switching to the same branch in question yielded an even stranger result: In this new project, the commits were there (I could see them in git log and in git log origin/myBranch) whereas in the previous older project I did not... does that make sense? Our origin branches are located on a central server so can't quite figure out why viewing the log of the same remote branch from two different projects would yield different results. Any suggestions? At this point, I'm just really curious.

-- Irene
On Tue, Mar 24, 2009 at 9:24 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 45 quoted lines
> On Wed, 25 Mar 2009, John Tapsell wrote:
>
>> 2009/3/24 Daniel Barkalow <barkalow@iabervon.org>:
>> > On Tue, 24 Mar 2009, John Tapsell wrote:
>> >
>> >> 2009/3/24 Irene Ros <imirene@gmail.com>:
>> >> > Hi all,
>> >> >
>> >> > I've been using git for some time now and haven't run into this issue
>> >> > before, perhaps someone else here has:
>> >> >
>> >> > I have a branch that is ahead of its origin by a few commits:
>> >> >
>> >> > $ git status
>> >> > # On branch myBranch
>> >> > # Your branch is ahead of 'origin/myBranch' by 10 commits.
>> >>
>> >> Tried running: git fetch   ?
>> >>
>> >> For some weird reason  "git push origin mybranch"  doesn't actually
>> >> update origin/mybranch.  It's more annoying :-)
>> >
>> > It should, so long as you're using the native transport and
>> > origin/mybranch actually tracks mybranch on origin.
>> >
>> > "git push" doesn't update it, but the code that implements the native
>> > transport does update it if it succeeds.
>> >
>> > (Actually, I'm not 100% sure that, if you update origin through some other
>> > channel with exactly the commit that you now have in mybranch locally, and
>> > then try the push, it will update the local tracking for that branch; is
>> > that what you've hit?)
>>
>> I update via http - maybe that's why?  origin/mybranch is never
>> updated when I push.  It's not just a once-off quirk.
>
> Yup, http doesn't have it. One of my series currently in next moves it
> from the git-specific protocol to the common code, but there's still work
> to be done to allow the http push transport to report back to the common
> code what got updated successfully, which is largely a matter of making
> the http-push code run in-process instead of as a command run by
> transport.c, and using the just-added API.
>
>        -Daniel
> *This .sig left intentionally blank*
Previous: Daniel BarkalowNext: John Tapsell
Message 7 of 13 in “branch ahead in commits but push claims all up to date”
  1. Irene RosMar 24, 2009
  2. Junio C HamanoMar 24, 2009
  3. John TapsellMar 24, 2009
  4. Daniel BarkalowMar 24, 2009
  5. John TapsellMar 25, 2009
  6. Daniel BarkalowMar 25, 2009
  7. Irene RosMar 25, 2009
  8. John TapsellMar 25, 2009
  9. Daniel BarkalowMar 25, 2009
  10. Irene RosMar 25, 2009
  11. Santi BéjarMar 25, 2009
  12. John TapsellMar 26, 2009
  13. Björn SteinbrinkMar 26, 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.