commit to the wrong branch what to do

Uwe Brauer oub at mat.ucm.es
Thu Sep 1 09:16:29 UTC 2016


Hi

Most likely this sometimes happens:
I added, removed, edited and then commit, but alas to the wrong branch.
What is the most efficient way to solve this issue?

I did it completely manually.

 hg update wrong-branch
copied the files in question to another place.

 hg update correct-branch

Copied the correct files, and moved out the not needed files.

 hg commit -m "repaired"

hg update wrong-branch

Copied the files

 hg commit "back to the wrong branch"

Maybe a patch would have been the simpler solution?



More information about the Mercurial mailing list