Git Merge - Binary File Conflict Resolution

流过昼夜 提交于 2019-12-07 14:24:43

问题


How do I resolve a binary file conflict resolution during a merge operation in git? Here's what I've done so far:

git checkout master
git fetch origin
git merge working_branch

... [Conflicts] ...

git status
...
Unmerged paths:
        both modified:   Path/file.dll
        ...

I want to keep the version in the working_branch and discard the version in the master. How do I do this?


回答1:


Figured it out earlier today:

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"


来源:https://stackoverflow.com/questions/29395570/git-merge-binary-file-conflict-resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!