1

I wanted to do an abort on an interactive rebase by doing git rebase --abort, but I am getting the error:

fatal: Could not parse object '7af12fc7e6ea2bb5231abe39c59cec9539f9536f'.

I've tried resetting the head and it didn't help. Any idea?

4

1 回答 1

2

您也可以使用此方法中止变基。替换<branch>为您碰巧要变基的任何分支:

cd .git
rm -rf rebase-merge
cd ..
git checkout <branch>

即,进入.git目录,删除 rebase 目录,返回存储库(现在处于分离的 HEAD 状态)并签出分支(将 HEAD 移动到分支尖端)。

于 2012-07-31T13:37:56.237 回答