首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Git错误:以前的重基目录.git/ rebase -apply仍然存在,但mbox给定

Git错误:以前的重基目录.git/ rebase -apply仍然存在,但mbox给定
EN

Stack Overflow用户
提问于 2014-06-09 13:50:17
回答 2查看 60K关注 0票数 86

我正在尝试应用一个补丁程序,这是我从http://www.winehq.org/pipermail/wine-devel/2014-May/104356.html获得的。我将其复制到文本编辑器中,并将其保存为my.patch (我需要修复电子邮件,它已经被混淆了)。

我试图将它应用于Git,但我得到了以下错误:

代码语言:javascript
运行
复制
sashoalm@sashoalm-VirtualBox:~/Desktop/wine-git$ git am --signoff <my.patch
previous rebase directory /home/sashoalm/Desktop/wine-git/.git/rebase-apply still exists but mbox given.

这个神秘的错误信息让我不知道哪里出了问题,也不知道我需要做些什么才能让它正常工作。这个错误意味着什么?我该怎么解决呢?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-08-05 09:15:49

代码语言:javascript
运行
复制
git am --abort

为我工作,但git rebase --abort没有。

发生了什么:我试图应用一个修补程序,但它已经损坏(很可能是被Gmail copy pasting in body破坏的):

代码语言:javascript
运行
复制
git am bad.patch

吉特说:

代码语言:javascript
运行
复制
Applying: python: fix Linetable case to LineTable in docstrings and comments
fatal: corrupt patch at line 56
Patch failed at 0001 python: fix Linetable case to LineTable in docstrings and comments
The copy of the patch that failed is found in:
   /home/ciro/git/binutils-gdb/src/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

注意git如何给出解决方案:To restore the original branch and stop patching, run "git am --abort".

然后我显然忽略了这个消息,并立即尝试了一个固定的版本:

代码语言:javascript
运行
复制
git am good.patch

得到了错误。

票数 93
EN

Stack Overflow用户

发布于 2014-06-09 13:55:37

好的,原来我需要删除目录.git/rebase-apply。它在那之后起作用(或者至少给我不同的错误,说电子邮件又错了)。我仍然不知道这个错误到底意味着什么,也不知道为什么会有错误。

编辑:,如下面的评论所示,git am --abortgit rebase --abort可能是解决问题的更好方法,但我还没有对其进行测试。

票数 42
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24121709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档