简体   繁体   中英

Git Merge - Binary File Conflict Resolution

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?

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM