I can't git rebase --interactive anymore

非 Y 不嫁゛ 提交于 2019-12-05 03:01:25
GoZoner

During a 'git rebase' the ref that you are rebasing off of is checked out. If that ref is a commit then you will get a detached head; if it is a branch reference then that branch is checked out. If during the course of a commit a FATAL occurs, then you are left with a working directory in a munged state. For example, if you were on branch Foo and you tried to rebase off of Bar, then after a FATAL you will be at Bar or somewhere after Bar with a few rebase commits applied. You recover by checking out Foo as simply.

git rebase --abort 

or, if the rebase is really wedged (see reference below), as:

git checkout -f Foo

After that, you can safely try the rebase again to try to debug why the FATAL occurs. Here is a case where rebase fails when running out of memory and 'git rebase --abort' doesn't work.

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