Re: (beginner) git rm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/28/2009 01:00 PM, Zabre wrote:

Tomas Carnecky wrote:
Do you mean 'undelete' a file? git checkout d.txt - That restores the
file in the working tree and resets the index just for that file.


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'?

Oops, sorry. git checkout HEAD -- d.txt
You have to tell which version of d.txt you want. In your case the version in HEAD.

tom

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux