Removing a newly added file

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

 



Hi *,

 when you try removing a newly added file it success and removes the
file from the working directory. So if you do:

$ echo "newly added file" > new
$ git add new
$ git rm new

the file "new" is lost, it is not in the index, neither in HEAD. At
this moment the only way to recover the file new is searching for
unreachable objects. (Am I missing something?)

 I think that the "git rm new" should remove "new" from the index or
should fail, maybe with:

$ git rm new
error: 'new' is not in HEAD (hint: try --cached)

 Santi
-
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]