How do you "rollback" last commit on Mercurial?

Viewed 106568

I have a Mercurial repository that I use in local only... It's for my personal usage (so I don't "push" anywhere).

I made a commit with 3 files, but after that I understood that I should do commit 4 files...

Is there a way to "rollback" my last (latest, only one) commit, and "recommit" it with the correct files?

(I don't know why, but my "Amend current revision" option is not active, so I can't use it...)

3 Answers

In modern hg:

hg uncommit

or, for your exact problem:

hg add file4
hg amend
Related