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

Re: Re: Re: [Bug report] 'git status' always says "Your branch is up-to-date with 'origin/master'"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 6, 2014, 15:45 UTC
Message-ID
<20140106154552.GA22189@google.com>
In-Reply-To
<1283978462.720554.1388999328222.JavaMail.ngmail@webmail15.arcor-online.net>
Hi,
Thomas Ackermann wrote:
>>                                In repo_b your ref for origin/master
>> has not moved. It has remotely (meaning refs/heads/master in repo_a
>> has moved), but git status is not hitting the remote to find out; it
>> only looks at the local state.
[...]
> But for the simple use case where you only have a master
> branch I consider it not really helpful and - at least for me -
> misleading.
I see what you mean, and you're not the only one.

Git follows a rule of "never contact another machine unless explicitly asked to using a command such as 'git pull' or 'git fetch'". To support this, it makes a distinction between (1) the remote-tracking ref origin/master and (2) the actual branch "master" in the remote repository. The former is what is updated by 'git fetch', and the latter is something git does not know about without talking to the remote server.

What documentation did you use when first starting to learn git? Perhaps it can be fixed to emphasize the distinction between (1) and (2) earlier.

Thanks, Jonathan

Previous: Thomas AckermannNext: Thomas Ackermann
Message 4 of 8 in “Aw: Re: [Bug report] 'git status' always says "Your branch is up-to-date with 'origin/master'"”
  1. Thomas AckermannJan 6, 2014
  2. Bryan TurnerJan 6, 2014
  3. Aw: Re: Re: [Bug report] 'git status' always says "Your branch is up-to-date with 'origin/master'"Thomas Ackermann, Jan 6, 2014
  4. Jonathan NiederJan 6, 2014
  5. Aw: Re: Re: Re: [Bug report] 'git status' always says "Your branch is up-to-date with 'origin/master'"Thomas Ackermann, Jan 6, 2014
  6. Junio C HamanoJan 6, 2014
  7. Keshav KiniJan 14, 2014
  8. Jiang XinJan 6, 2014

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.