git status | grep both | awk -F ' ' '{printf "%s\n", $3}' | xargs -J % git checkout --ours %
Explanation:
git status
List changed files
grep both
Pick up conflict files.
awk -F ' ' '{printf "%s\n", $3}'
Get the file names. The third column separated with space.
xargs -J % git checkout --ours %
For each file check out ours.