首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >修复冲突后,git还在抱怨吗?

修复冲突后,git还在抱怨吗?
EN

Stack Overflow用户
提问于 2010-09-01 00:49:36
回答 5查看 19.7K关注 0票数 34

当我从我的队友那里引入更改时,我通常会使用rebase,并且经常会有冲突:

代码语言:javascript
运行
复制
...
CONFLICT (content): Merge conflict in app/views/search/index.html.erb
Auto-merging public/stylesheets/application.css
CONFLICT (content): Merge conflict in public/stylesheets/application.css
Failed to merge in the changes.
Patch failed at 0001 organizing

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

因此,在打开每个有冲突的文件后,修复它,然后提交修复的文件:

代码语言:javascript
运行
复制
~/Projects/myApp[956f6e1...]% git rebase --continue
You must edit all merge conflicts and then
mark them as resolved using git add

我仍然得到相同的错误...

代码语言:javascript
运行
复制
~/Projects/myApp[64b3779...]% git rebase --continue                         
Applying: organizing
No changes - did you forget to use 'git add'?

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

我一直有这个问题,但我猜我从来没有真正选择解决它,我总是我只是变得懒惰和git rebase --skip

我如何真正以正确的方式解决冲突?

EN

Stack Overflow用户

发布于 2021-02-24 21:32:52

我已经解决了合并冲突,但我仍然看到

您有未合并的路径。

我所要做的就是git add <file that had conflicts>,从那时起一切都很顺利。

票数 0
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3611260

复制
相关文章

相似问题

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