在 git 中 merge 时如何强制执行“我的更改”?有人把所有的 bin 目录都放在 git 中,现在我遇到了可怕的 merge 冲突:(
现在它说的是:
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".
我不想 merge ,我只想使用我的更改删除所有这些文件。
编辑: 大多数文件已成功 merge ,要么是通过自动 merge ,要么是因为没有冲突。然而,像下面这样的一些仍然存在。
warning: Cannot merge binary files: src/reports/obj/Debug/TempPE/GroupMailDS.Designer.cs.dll (HEAD vs. added gitignore)
最佳答案
我对此不是 100% 有信心,但我认为这是一个很好的案例:
git merge otherbranch -s recursive -X ours
该命令尝试使用递归策略将主题分支 merge 到您 checkout 的分支中。 -X ours 选项是递归策略的一个子集,它通过假设您当前 checkout 的分支是权威的来自动解决冲突。
关于git - 如何在 git 中使用我的更改进行 merge ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3100167/