I have two branches Dev and Feature1. I was working on Feature1, creating said feature, and committed it. I then wrote the code for Feature2 but committed it under Feature1 branch instead of a new branch (Feature2). So now i have two features in Feature1 branch as two separate commits, but I only want to include the second feature back into Dev.
What is the mercurial way to do this?
Supposed you have not yet published your commits:
If you want to merge the commit Feature2 independent of commit Feature1, you should
move it on its own branch.
If already published:
Use the transplant extension to “duplicate” the Feature2 commit and put it on
its own branch. Then backout Feature2 commit on the Feature1 branch. Now you
merge Feature2 independent of Feature1 too.
In any case, instead of putting Feature2 on its own branch, you could also put it
directly onto your Dev branch if this is your actual intention.