Git合并-二进制文件冲突解决



如何在git中的合并操作中解决二进制文件冲突?以下是我迄今为止所做的:

git checkout master
git fetch origin
git merge working_branch
... [Conflicts] ...
git status
...
Unmerged paths:
        both modified:   Path/file.dll
        ...

我想保留working_branch中的版本并丢弃master中的版本。我该怎么做?

今天早些时候想好了:

git checkout --theirs Path/file.dll
git add Path/file.dll
git commit -m "Resolved merge conflict by checking out file from working_branch and adding it to the master"

最新更新