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

Re: fetch and pull

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2009, 09:37 UTC
Message-ID
<7v1vsvi339.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090318085849.GA8118@atjola.homenet>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
Show 6 quoted lines
> 1) You do "git pull git://host/repo.git" or similar, i.e. you don't use
> a remote. Because then, no refspec is given to fetch, and it defaults to
> fetching HEAD.
> ...
> 1) probably isn't that common for most users, and even if, it's not
> one of the commands given as examples to which the paragraph applies.

I think "a maintainer responds to a pull request" is the only case that happens often in practice for a fetch+merge of HEAD from a remote repository.

Even in that case, we strongly encourage people to say not just "which repository location" but also "which branch", i.e.

	Linus, please pull from:
		git://git.or.cz/alt-git.git for-linus
	to obtain the following commits.
When Linus cuts and pastes that to his shell, the command will become:
	$ git pull git://git.or.cz/alt-git.git for-linus
and HEAD is not involved in such a use case.
Previous: Björn SteinbrinkNext: John Dlugosz
Message 15 of 19 in “Re: fetch and pull”
  1. John DlugoszMar 16, 2009
  2. Jay SoffianMar 16, 2009
  3. John DlugoszMar 16, 2009
  4. Sverre RabbelierMar 16, 2009
  5. Jeff KingMar 17, 2009
  6. Sverre RabbelierMar 17, 2009
  7. Jay SoffianMar 16, 2009
  8. John DlugoszMar 16, 2009
  9. Jay SoffianMar 17, 2009
  10. John DlugoszMar 17, 2009
  11. Jay SoffianMar 17, 2009
  12. John DlugoszMar 17, 2009
  13. Nanako ShiraishiMar 17, 2009
  14. Björn SteinbrinkMar 18, 2009
  15. Junio C HamanoMar 18, 2009
  16. John DlugoszMar 18, 2009
  17. Björn SteinbrinkMar 18, 2009
  18. John DlugoszMar 18, 2009
  19. Jeff KingMar 18, 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.