如果--abort不起作用,如何中止交互式重新分配? [英] How to abort an interactive rebase if --abort doesn't work?

查看:324
本文介绍了如果--abort不起作用,如何中止交互式重新分配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过一个互动的基金会让自己陷入泥潭,现在我想放弃它。 (即回到之前我被放入交互式底线模式,在我的情况下通过 git pull --rebase 。)做到这一点的方式似乎是通过 git rebase --abort ,但这是行不通的:

I've got myself into a muddle via an interactive rebase, and I now wish to abort it. (i.e. go back to the point before I was dropped into interactive rebase mode, in my case via git pull --rebase.) The way to do this seems to be via git rebase --abort, but this doesn't work:

$ git rebase --abort
error: Ref refs/heads/master is at 55b388c141b1485b1acd9e050dbeb0eb90ef2ee7 but
expected b918ac16a33881ce00799bea63d9c23bf7022d67
fatal: Cannot lock the ref 'refs/heads/master'.
Could not move back to refs/heads/master

如何退出互动rebase模式,并清除所有对它的引用? ( git reset --hard 成功了,但是并没有让我脱离rebase模式。)

How can I get out of interactive rebase mode, and clean up all references to it? (git reset --hard succeeds, but doesn't drop me out of rebase mode.)

推荐答案

尝试按照您在屏幕上看到的建议,首先将主人的HEAD重置为它所期望的提交。

Try to follow the advice you see on the screen, and first reset your master's HEAD to the commit it expects.

git update-ref refs/heads/master b918ac16a33881ce00799bea63d9c23bf7022d67

然后,再次放弃rebase 。

Then, abort the rebase again.

这篇关于如果--abort不起作用,如何中止交互式重新分配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆