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

Re: "Your branch is ahead of 'origin' by X commits"

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Dec 2, 2016, 13:42 UTC
Message-ID
<vpqk2bisb0z.fsf@anie.imag.fr>
In-Reply-To
<D465BDE6.B7DE%ernesto.alfonsogonzalez@ge.com>

"Alfonsogonzalez, Ernesto (GE Digital)" <ernesto.alfonsogonzalez@ge.com> writes:

Show 11 quoted lines
> Hi,
>
> Git status tells me "Your branch is ahead of 'origin' by 108 commits.²,
> but my local and origin/master are pointing to the same commit.
>
> What am I doing wrong?
>
> $ git diff origin/master
> $ git status
> On branch master
> Your branch is ahead of 'origin' by 108 commits.

This line should say "ahead of 'origin/master'" in common setups, where 'origin/master' is the remote-tracking branch configured as upstream for 'master'.

My guess is that you have a badly configured upstream.

What does "git pull -v" say? What's the content of the [branch "master"] section of .git/config?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jeff King
Message 3 of 3 in “"Your branch is ahead of 'origin' by X commits"”
  1. Alfonsogonzalez, Ernesto (GE Digital)Dec 1, 2016
  2. Jeff KingDec 1, 2016
  3. Matthieu MoyDec 2, 2016

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.