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

Re: (beginner) git rm

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 28, 2009, 22:33 UTC
Message-ID
<7v7i4fkqmo.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090128221355.GE7503@atjola.homenet>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
Show 6 quoted lines
> With "checkout", I'm still a bit unsure about which term to use, because
> of the behaviour you get with, for example, "git checkout HEAD --
> directory".
> ...
> It would probably be better to say that checkout only works with the
> blobs (because the index doesn't have entries for trees, right?).

True, it is not just "checkout". There is no such thing as "directory" in git UI, in that sense.

When you say:
	git checkout [<tree-ish>] -- pathspec

you may be using the same string as the name of an existing directory, but that does not change the fact that you are giving a pathspec pattern to specify the set of paths in the index (or in the <tree-ish>) that matches the pathspec.

Previous: Björn SteinbrinkNext: Björn Steinbrink
Message 15 of 16 in “(beginner) git rm”
  1. ZabreJan 28, 2009
  2. Peter KreftingJan 28, 2009
  3. ZabreJan 28, 2009
  4. Tomas CarneckyJan 28, 2009
  5. ZabreJan 28, 2009
  6. Tomas CarneckyJan 28, 2009
  7. Theodore TsoJan 28, 2009
  8. ZabreJan 28, 2009
  9. ZabreJan 28, 2009
  10. Björn SteinbrinkJan 28, 2009
  11. ZabreJan 28, 2009
  12. ZabreJan 28, 2009
  13. Junio C HamanoJan 28, 2009
  14. Björn SteinbrinkJan 28, 2009
  15. Junio C HamanoJan 28, 2009
  16. Björn SteinbrinkJan 29, 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.