How to override unmerged git checkout with upstream version

If you need to do for all both modified unmerged files , there is a simple way to do that instead of doing for each one:

git reset $( git status | grep both | awk '{print $4}')
git checkout $( git status | grep modified | awk '{print $3}')

If you need to do for all [added/deleted] by us unmerged files , there is a simple way to do that instead of doing for each one:

git reset $( git status | grep us | awk '{print $5}')
git checkout $( git status | grep modified | awk '{print $3}')

If you need to do for all [added/deleted] by them unmerged files , there is a simple way to do that instead of doing for each one:

git reset $( git status | grep them | awk '{print $5}')
git checkout $( git status | grep modified | awk '{print $3}')

You might need to reset the file first, before doing the checkout:

git reset -- Jovie/Jovie-Info.plist
git checkout -- Jovie/Jovie-Info.plist

The reset un-stage the changes in progress (here the merge, with the conflict markers in the file).
Then the checkout can restore the index with the last commit content.