Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

May 262011

Revert the effect of an earlier changeset in Mercurial


In Mercurial, if you want to revert the effect of an earlier changeset, even the changes have been pushed to remote, it is still possible with the hg backout command.

1. Find the revision you want to backout using hg log
# hg log

2. Assume you want to backout to the revision 99, then you can
# hg backout -r 99