#TIL : Resolving conflict like a boss


13 Jun 2017 / by KhanhIceTea

When using git merge new branch to old branch, you just want use all ours or theirs version but be lazy to update every conflicted file.

grep -lr '<<<<<<<' . | xargs git checkout --ours

Or

grep -lr '<<<<<<<' . | xargs git checkout --theirs

Explain : these commands will find any file contains <<<<<<< string (conflicted file) and run git checkout --[side]


Sound good ?