Mercurial - 恢復舊版本並從那裏繼續 - Mercurial — revert back to old version and continue from there

問題:

I'm using Mercurial locally for a project (it's the only repo there's no pushing/pulling to/from anywhere else). 我在本地使用Mercurial進行項目(這是唯一沒有推送/拉動其他地方的回購)。

To date it's got a linear history. 到目前爲止,它有一個線性歷史。 However, the current thing I'm working on I've now realized is a terrible approach and I want to go back to the version before I started it and implement it a different way. 然而,我正在研究的當前事情我現在已經意識到這是一種可怕的方法,我想在開始之前回到版本並以不同的方式實現它。

I'm a bit confused with the branch / revert / update -C commands in Mercurial. 我對Mercurial中的branch / revert / update -C命令感到困惑。 Basically I want to revert to version 38 (currently on 45) and have my next commits have 38 as a parent and carry on from there. 基本上我想恢復到版本38(目前在45)並讓我的下一個提交有38作爲父母並從那裏繼續。 I don't care if revisions 39-45 are lost for ever or end up in a dead-end branch of their own. 我不在乎修改39-45是永遠丟失還是最終落入他們自己的死衚衕。

Which command / set of commands do I need? 我需要哪個命令/命令集?


解決方案:

參考一: https://stackoom.com/question/Aet4
參考二: Mercurial — revert back to old version and continue from there
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章