我一直在做一个远程git仓库的本地副本。 我在本地副本上创建了一个分支,我们称之为'my_branch'。 我在my_branch上犯了几次错误。Git重新绑定到master的分支失败,如何解决?
我最近把'my_branch'推到了远程。但是我不知道其他人向远程主服务器添加了一个版本。所以,我将它提交给我的当地主人。
所以...长话短说,我的本地回购看起来像这样(我试图使用diagraming公约here)。
--C0--------------C7-- (local master)
\
--C1-C2-C3-- (local my_branch)
\
--C4-C5-C6-- (local sandbox_branch)
我希望它看起来像:
--C0--------------C7-- (local master)
\
--C1'-C2'-C3'-- (local my_branch)
\
--C4'-C5'-C6'-- (local sandbox_branch)
我试图变基my_branch ONTO本地主,但我得到这个错误信息(我使用混帐称为GitX的可视化工具):
Rebase Failed!
There was an error rebasing HEAD with branch 'master'.
command: git rebase refs/heads/master
It seems that I cannot create a rebase-apply directory, and
I wonder if you are in the middle of patch application or another
rebase. If that is not the case, please
rm -fr /my_project_directory/.git/rebase-apply
and run me again. I am stopping in case you still have something
valuable there.
我在做什么错?我该如何处理?如果我要在命令行上执行此操作,请在上图中指明我的状态的命令是什么?
更新1
顺便说一句,我不是在应用程序补丁或其它底垫的中间......至少不是故意的。 当我发现远程更新后,我推,我做了一个提取。难道这已经做了什么让GitX认为我正处于应用程序补丁或另一个rebase的中间?
我也更新了图表,以便更准确。 my_branch有一个分支。我没有把它列入原来的问题B/C中,我认为这不重要。我包括万一......
更新2
FYI ...主树“本地”和“远程”看起来像我画的图,但它不”没有sandbox_branch。
你试过'git rebase --abort'吗? – 2012-01-08 18:56:08
“看来我无法创建一个rebase-apply目录,并且 我不知道您是否正在修补程序应用程序或另一个 rebase”< - 是这种情况吗? – fge 2012-01-08 18:56:33
@fge。好问题。我更新了描述。 – milesmeow 2012-01-08 19:13:35