Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove experimental branch

How do I remove a feature branch in mercurial if I want to remove it completely? It should be stripped from the history and I don't want to merge the changes in another branch (just throw the code away).

I know that I can clone my other branches to a new repository like described here but that does not seem to be a clean solution.

like image 388
schlamar Avatar asked Jun 18 '12 14:06

schlamar


1 Answers

I found a working solution here.

It works by using hg strip from the mq extension:

$ hg strip my_pruned_branch

As mentioned in the comments, this should only be used for unpublished changesets.

like image 192
schlamar Avatar answered Sep 23 '22 12:09

schlamar