Deduction of many commits (15) in mercury

I have a β€œtest” branch, and I have the wrong 15 commits in it (they are the last commits in this branch). I do not need these commits, and I want to support them. But I also need to have a "test" branch, I can’t just close it.

  • How to compensate for many commits? It is too difficult to do this with mercantile standard redundancy, there will be too many commits and merges. Is there a way to combine all of the backup commits in one big commit?

  • Is there a way to rename a branch and close it?

All changes exist on the remote server. These changes are not the last changes in the full repo, they are the latest changesets only in the test branch.

+4
source share
2

( , , strip -ed ), :

1) --close-branch , update , , . , .

2) hg revert -r <last good rev> . , <last good rev>, , , 15 , . hg diff -r <last good rev>, , , , .

strip ( @Dalija answer), , hg phase, secret strip - . , , .

+3

Source: https://habr.com/ru/post/1568607/


All Articles