What is preferred way to undo add?

Matthieu Moy Matthieu.Moy at imag.fr
Mon Jun 5 09:22:27 CDT 2006


Neal Becker <ndbecker2 at gmail.com> writes:

> Kyle Butt wrote:
>
>> On Mon, Jun 05, 2006 at 09:23:54AM -0400, Neal Becker wrote:
>>> If I did add but not yet commit, what is the 'best' way to undo the add?
>>> 
>> I believe you want hg forget
>> then mercurial will undo the add, and not the last transaction (which is
>> not what you want.
>> 
>> Kyle.
>
> If so, please add this to hg --help.

According to a discussion on bazaar-ng's ML (whose developers are
meeting hg's ones), "hg forget" is more or less deprecated, and
"revert" is the prefered way. And "revert" will soon have an option to
leave the file unversionned instead of deleting it.

-- 
Matthieu


More information about the Mercurial mailing list