How to delete remote commit from bitbucket mercurial repository

Nafeez Abrar picture Nafeez Abrar · Feb 26, 2015 · Viewed 8.3k times · Source

How to delete a remote commit from bitbucket mercurial repository?

Findings: I could not found "Repository management" in the "Admin" section. which is mentioned in this answer. Is this feature deprecated/dropped from bitbucket? If not where it is? Note that I am owner of the repository.

Note for expert! only: Remember I have already pushed my commit to bitbucket. I know deleting commit is not good, I am not interested to a backout my history by adding an extra commit. Moreover I can ensure you that someone will strip the commit manually from every local clone of this repo. So you don't have to be worried about this.

Answer

Nanhydrin picture Nanhydrin · Feb 26, 2015

On BitBucket, go to the overview page for the repository you're talking about.

There is a menu down the left hand side and at the bottom of it is an entry called Settings, click on that.
Then on the settings page there's an entry called Strip Changesets or Strip commits where you can specify the revision to strip.

Remember that if the changeset you want to remove has child changesets that those will be stripped too.