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

bug? - git-checkout treeish paths ignores deleted files

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Oct 9, 2007, 00:58 UTC
Message-ID
<470AD21E.6070906@gmail.com>

Shouldn't "git checkout topic path" make the directory tree rooted at path identical to what is on branch topic? It doesn't.

Try this:

mkdir test cd test git init touch a b git add a b git commit -m 'base' git checkout -b topic git rm a git commit -m 'removed a' git checkout master git checkout topic .

...and the result is... ls a b

instead of b

Mark
Next: Wincent Colaiuta
Message 1 of 4 in “bug? - git-checkout treeish paths ignores deleted files”
  1. Mark LevedahlOct 9, 2007
  2. Wincent ColaiutaOct 9, 2007
  3. Mark LevedahlOct 9, 2007
  4. Wincent ColaiutaOct 9, 2007

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.