git checkout --theirs src/conflict.js

Category: Git - Advanced

git checkout --theirs src/conflict.js

Take the incoming version of a conflicted file

Resolves the conflict by keeping the branch being merged in, stage three, and discarding your local changes to that file. --ours is the opposite. After running it the file still needs a final commit to finish the merge.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.