Remove a revision in TortoiseHG and Mercurial

旧时模样 提交于 2019-12-05 06:35:45

Proper solution is to actually merge with option Discard all changes from merge target (other) revision. But sometimes life is harder on us and we really need to drop some changes (eg. we committed nuclear launch codes or some other security sensitive data). Is that your case? If yes then follow.

Assuming that original changes were not published you could:

  • enable mq extension
  • r-click on offending changes and execute Modify history->Strip. This will permanently remove changes from your local history.

You don't want to delete revisions and therefore destroy history. That goes against the reason version control exists.

You can do a merge and discard.

You can also do this in tortoiseHG.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!