I\'m using Mercurial and I\'ve got into a terrible mess locally, with three heads. I can\'t push, and I just want to delete all my local changes and commits and start again with
You may use
hg strip revision
to kill any revision and its subtree in your local repository.
https://www.mercurial-scm.org/wiki/Strip
But don't try to use it for anything that has been already pushed.