git checkout --ours src/conflict.js

Category: Git - Advanced

git checkout --ours src/conflict.js

Take your version of a conflicted file

Resolves the conflict in the named file by taking your side, stage two, of the merge. --theirs picks the incoming side instead. The file is then staged as resolved. Use it when one side is known to be correct.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.