How to permanently remove the changeset from Mercurial?

Steps

  1. Backup repository/repositories you want to modify.
  2. Enable “mq” extension. If you don’t know how to enable it, follow these steps.
    1. Open TortoiseHG Workbench
    2. Go to File > Settings > USERNAME’s Global Settings > Extensions > select “mq” > press OK button
    3. Restart TortoiseHG by closing and opening it again.
  3. Select changeset you want to remove > Right click > Modify History > Strip … > press Strip button
  4. Broadcast to everyone who uses the repository to clone it from “clean” repository

Reminder

I would like to remind you that typically it is against the best practice to permanently remove any changeset from any version control.

Prerequisite

  • Small team
  • Full control over all the clones

Why remove and not back out?

You want to keep the repository “clean”

Share

1 comment

Your email address will not be published. Required fields are marked *

  1. leo says:

    It works, thank you