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

Re: (beginner) git rm

From
ZZabre <427@free.fr>
Date
Jan 28, 2009, 11:05 UTC
Message-ID
<1233140751523-2231622.post@n2.nabble.com>
In-Reply-To
<Pine.LNX.4.64.0901281133380.645@ds9.cixit.se>
Peter Krefting wrote:
Show 8 quoted lines
> 
> Here you have not yet committed the change, so the change is only in
> the staging area. You need to
> 
>   git commit
> 
> to create a commit on your branch.
> 

Thank you Peter. I've just done a hard reset and redid it the right way. It worked as expected.

$ git checkout new $ rm d.txt $ git rm d.txt $ git commit

I am a little bit confused regarding rm : first I did a simple "rm" but git would not commit, so I had to "git rm" for the index to be modified and have something to commit. Is this the right way to do things?

Another question would be : instead of doing a hard reset (I might have other changes in the index that I don't want to loose) is it possible to remove only one "delete action" from the index?

-- 
View this message in context: http://n2.nabble.com/%28beginner%29-git-rm-tp2231416p2231622.html
Sent from the git mailing list archive at Nabble.com.
Previous: Peter KreftingNext: Tomas Carnecky
Message 3 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.