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.