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

unclear description of git-rm on kernel.org

From
ARalec resnick <alec@sproutward.org>
Date
Jan 4, 2009, 22:10 UTC
Message-ID
<62a60dd90901041410j283866e5ja39c3bda447fed36@mail.gmail.com>
Hi!

I was trying to remove a number of files from a git repo I had. I read http://kernel.org/pub/software/scm/git/docs/v1.4.4.4/git-rm.html which I interpreted to mean that git-rm removed only from the index, and not from the working tree. In retrospect, the short description is clear: "git-rm - Remove files from the working tree and from the index," but I was confused by the language: "<file>…

    Files to remove from the index and optionally, from the working
tree as well.
-f
    Remove files from the working tree as well as from the index."

Because of "optionally" and the very existence of the "-f" option suggests that you have to do something extra to ask git-rm to mess with the working tree.

The manpage is much clearer, and while I recovered the files I accidentally removed simply with git checkout, I suggest that the webpage be made a bit clearer. In particular, adding info about how to _only_ remove files from the index would be helpful.

I'd be happy to make the changes to the webpage; I don't know how to do that or if it's appropriate.

Thanks!
-a.
Next: Miklos Vajna
Message 1 of 2 in “unclear description of git-rm on kernel.org”
  1. alec resnickJan 4, 2009
  2. Miklos VajnaJan 4, 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.