撤消 mercurial rebase
Undoing a mercurial rebase
我已经对我的本地存储库进行了 rebase,但它出错了。我该如何恢复?
变基前
@ 225:c5eb9b47e19a Task #1 modified due to comment by peers
|
| o 224:7a1964c6b694 WIP on Task #2 depending on Task #1
| |
| o 223:eb5a2ce5ef36 Task #1 sent for peer review
|/
o 222:d18063b01959 Remote tip
不幸的变基
来自 git 世界,我习惯于对事物进行变基。那可能是我的错误。
$ hg rebase -r224
merging some_file
3 files to edit
saved backup bundle to /path/to/repo/.hg/strip-backup/7a1964c6b694-backup.hg
变基后
@ 224:c5eb9b47e19a Task #1 modified due to comment by peers
|
| o 223:eb5a2ce5ef36 Task #1 sent for peer review
|/
o 222:d18063b01959 Remote tip
$ hg diff
# nothing
$ hg st -amdr
# nothing
$ hg update --clean 7a1964c6b694
abort: unknown revision '7a1964c6b694'!
我丢失了作为 WIP 提交的工作,具体取决于任务 #1:它不在 c5eb9b47e19a
中(我一定是搞砸了合并),原始提交消失了(是吗?)。
如何取消/恢复我的变基?
找回 "WIP on Task #2 depending on Task #1"
hg up 223
hg unbundle /path/to/repo/.hg/strip-backup/7a1964c6b694-backup.hg
与"WIP on Task #2 depending on Task #1"相反
hg revert --all -r 223
hg commit -m opposite of WIP on Task #2 depending on Task #1
应用"WIP on Task #2 depending on Task #1"相反的方法来撤消合并
hg update 224
hg rebase -r 225
我已经对我的本地存储库进行了 rebase,但它出错了。我该如何恢复?
变基前
@ 225:c5eb9b47e19a Task #1 modified due to comment by peers | | o 224:7a1964c6b694 WIP on Task #2 depending on Task #1 | | | o 223:eb5a2ce5ef36 Task #1 sent for peer review |/ o 222:d18063b01959 Remote tip
不幸的变基
来自 git 世界,我习惯于对事物进行变基。那可能是我的错误。
$ hg rebase -r224
merging some_file
3 files to edit
saved backup bundle to /path/to/repo/.hg/strip-backup/7a1964c6b694-backup.hg
变基后
@ 224:c5eb9b47e19a Task #1 modified due to comment by peers | | o 223:eb5a2ce5ef36 Task #1 sent for peer review |/ o 222:d18063b01959 Remote tip
$ hg diff
# nothing
$ hg st -amdr
# nothing
$ hg update --clean 7a1964c6b694
abort: unknown revision '7a1964c6b694'!
我丢失了作为 WIP 提交的工作,具体取决于任务 #1:它不在 c5eb9b47e19a
中(我一定是搞砸了合并),原始提交消失了(是吗?)。
如何取消/恢复我的变基?
找回 "WIP on Task #2 depending on Task #1"
hg up 223
hg unbundle /path/to/repo/.hg/strip-backup/7a1964c6b694-backup.hg
与"WIP on Task #2 depending on Task #1"相反
hg revert --all -r 223
hg commit -m opposite of WIP on Task #2 depending on Task #1
应用"WIP on Task #2 depending on Task #1"相反的方法来撤消合并
hg update 224
hg rebase -r 225