What is preferred way to undo add?

Christian Ebert blacktrash at gmx.net
Mon Jun 5 09:52:37 CDT 2006


* Sébastien Pierre on Monday, June 05, 2006 at 10:02:57 -0400:
> Le lundi 05 juin 2006 à 15:51 +0200, Christian Ebert a écrit :
>> * Neal Becker on Monday, June 05, 2006 at 09:23:54 -0400:
>>> If I did add but not yet commit, what is the 'best' way to undo the add?
>> 
>> $ hg remove -f addedbutnotyetcommitted
>> 
>> works for me. Don't know if there's a better way.
> 
> This removes the file as well, which is not the undo of an add.

$ hg st
A a
$ hg rm -f a
$ hg st
? a
$ cat a
hello world

I /believe/ only committed files get removed; anyway 'revert'
seems to be the canonical way to do this.

c
-- 
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


More information about the Mercurial mailing list