Git 错误:先前的 rebase 目录 .git/rebase-apply 仍然存在,但给出了 mbox

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24121709/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 18:10:38  来源:igfitidea点击:

Git error: previous rebase directory .git/rebase-apply still exists but mbox given

gitpatch

提问by sashoalm

I'm trying to apply a patch, which I took from http://www.winehq.org/pipermail/wine-devel/2014-May/104356.html. I copied it into a text editor, and saved it as my.patch(I needed to fix the email, it had been obfuscated).

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

I tried to apply it with Git, but I'm getting this error:

我试图用 Git 应用它,但我收到了这个错误:

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.

This cryptic error message gives me no idea what's wrong or what I need to do to make it work. What does this error mean? And how do I fix it?

这个神秘的错误消息让我不知道出了什么问题,也不知道我需要做什么才能让它工作。这个错误是什么意思?我该如何解决?

回答by sashoalm

Ok, it turned out I needed to delete the directory .git/rebase-apply. It works after that (or at least gives me different errors, saying the email is wrong again). I still have no idea what the error actually means or why there was an error.

好吧,原来我需要删除目录.git/rebase-apply。之后它就可以工作了(或者至少给了我不同的错误,说电子邮件又错了)。我仍然不知道错误的实际含义或出现错误的原因。

Edit:As the comments below suggest, git am --abortor git rebase --abortmight be a better way to fix the problem, but I have not tested it.

编辑:正如下面的评论所暗示的那样,git am --abort或者git rebase --abort可能是解决问题的更好方法,但我还没有测试过。