What is preferred way to undo add?

TK Soh teekaysoh at gmail.com
Mon Jun 5 09:23:06 CDT 2006


On 6/5/06, Kyle Butt <kylebutt at gmail.com> 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.

hg forget has been deprecated, in favor of hg revert. I like the fact
that there's one less command to learn (for new users), but I am worry
each time I have to deal with hg revert. I just don't feel that it's
as safe as it should have been.

I like Benoit's idea on adding the options to select type of revert we
want to do. And in my case, --modified is what I'd really like to see
added.


More information about the Mercurial mailing list