简体   繁体   English

Mercurial:如何撤消所有尚未推送但已落实的本地更改

[英]Mercurial: How to undo all local changes that have not been pushed but have been committed

I have made a mess out of my local repo copy, but I don't really want to set the whole thing back up again. 我已经从本地回购副本中弄乱了,但我真的不想再次将整个备份。 I just need to dump everything in hg out. 我只需要把所有东西都扔掉就可以了。 All that is pushed up already is fine. 所有被推高的都很好。 Just not my local committed changes (some misguided backouts and merges). 只是不是我的本地承诺更改(一些误导的撤消和合并)。

Thoughts? 思考? Ideas? 想法?

I found the solution here: https://superuser.com/questions/89064/how-do-i-remove-outgoing-changesets-in-mercurial-hg 我在这里找到了解决方案: https : //superuser.com/questions/89064/how-do-i-remove-outgoing-changesets-in-mercurial-hg

Basically I just had to run: hg strip 'roots(outgoing())' And the problem was solved. 基本上我只需要运行: hg strip 'roots(outgoing())'问题就解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM