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

Re: confused about remote branch management

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 23, 2014, 21:41 UTC
Message-ID
<xmqqmwbzda80.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1406143336.29001.185.camel@localhost>
Ross Boylan <ross@biostat.ucsf.edu> writes:
> I still don't know what I need to do to update origin/master in my local
> repo.
>
> Regarding Kevin's suggestion, I just tried "git fetch origin master".

I think Kevin's suggestion was 'To older git, "git fetch origin master" tells it to fetch master without updating origin/master, so it is understandable that your origin/master was not molested'.

Either
	git fetch origin master:refs/remotes/origin/master
or if you want to be more explicit and unambiguous:
	git fetch origin refs/heads/master:refs/remotes/origin/master
should work on all versions of git.
Previous: Ross BoylanNext: Ross Boylan
Message 4 of 9 in “confused about remote branch management”
  1. Ross BoylanJul 23, 2014
  2. Chris PackhamJul 23, 2014
  3. Ross BoylanJul 23, 2014
  4. Junio C HamanoJul 23, 2014
  5. Ross BoylanJul 23, 2014
  6. Junio C HamanoJul 23, 2014
  7. Ross BoylanJul 24, 2014
  8. KevinJul 23, 2014
  9. Ross BoylanJul 23, 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.