每当我从我的队友那里拉取更改时,我通常会使用rebase
,但经常会出现冲突:
...
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".
所以,在打开每个存在冲突的文件后,进行修复并提交已修复的文件之后:
~/Projects/myApp[956f6e1...]% git rebase --continue
You must edit all merge conflicts and then
mark them as resolved using git add
我仍然收到相同的错误信息...
~/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
命令。
我应该如何正确地解决冲突?
git rebase --abort
解决了即时问题。再次感谢! - JP Silvashy