首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么` `git rebase --continue`失败并出现gitmodules错误?

为什么` `git rebase --continue`失败并出现gitmodules错误?
EN

Stack Overflow用户
提问于 2015-04-24 09:16:15
回答 2查看 986关注 0票数 1

我基于master创建了一个名为lab的分支。几个月后,我尝试根据master重新设置实验室分支的基础。首先有一个.gitignore冲突;在解决它之后,我运行了git rebase --continue,但它再次失败,这一次没有帮助信息告诉我如何继续这个rebase。如何根据master来调整实验室分支的基础?

代码语言:javascript
复制
git rebase --continue
Applying: start edit
Applying: a
fatal: mode change for .gitmodules, which is not in current HEAD
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0002 a
The copy of the patch that failed is found in:
   f:/testxxx/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
EN

回答 2

Stack Overflow用户

发布于 2015-04-24 21:52:46

.gitmodules存在于一个分支上,而不存在于另一个分支上。查看补丁文件,看看是哪一个,然后使用git add或git rm来决定是否需要.gitmodules文件作为rebase的结果。

票数 1
EN

Stack Overflow用户

发布于 2016-07-26 21:18:38

尝试使用--merge修饰符运行rebase

代码语言:javascript
复制
git rebase --merge branchname
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29837053

复制
相关文章

相似问题

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