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

How to undo git-rm?

From
NSNeil Schemenauer <nas@arctrix.com>
Date
Mar 18, 2008, 23:04 UTC
Message-ID
<20080318230441.GA664@arctrix.com>
Hi,

This seemingly simple operation has me stumped. I removed something from my try using "git rm" and now I want it back. With SVN I would use "svn cat <path> > <path>". After some searching around, I though git-cat-file would do the trick. Alas, it appears as though it looks up the SHA for the path in the index and so it too fails.

  Neil
Next: Junio C Hamano
Message 1 of 5 in “How to undo git-rm?”
  1. Neil SchemenauerMar 18, 2008
  2. Junio C HamanoMar 20, 2008
  3. Jakub NarebskiMar 20, 2008
  4. Elijah NewrenMar 20, 2008
  5. Elijah NewrenMar 20, 2008

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.