Tomas Carnecky wrote:Hi Tom, (thank you for your interest in my newbie problems) yes that's what I mean : 'undelete' a file, after a "git rm d.txt". But I did not manage to apply your solution succesfully : $ git rm d.txt $ ls a.txt b.txt c.txt $ git status # On branch new # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: d.txt # $ git checkout d.txt error: pathspec 'mamma.txt' did not match any file(s) known to git. Did you forget to 'git add'? So it did not work but I've just noticed that unstage tip given by the status command, and I did the following (which worked) $ git reset HEAD d.txt d.txt: needs update $ ls a.txt b.txt c.txt $ git checkout d.txt $ ls a.txt b.txt c.txt d.txt Reading the git reset help file gives me the feeling I should use this with caution... It looks like you can somehow modify the change history. Anyway these two commands helped me change the index the way I wanted. Please tell me if this might somehow go wrong in another situation. -- View this message in context: http://n2.nabble.com/%28beginner%29-git-rm-tp2231416p2231849.html Sent from the git mailing list archive at Nabble.com. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Stephen Rothwell | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Patrick McHardy | Re: [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
