Git Keep changes from only one side of a merge


Example

During a merge, you can pass --ours or --theirs to git checkout to take all changes for a file from one side or the other of a merge.

$ git checkout --ours   -- file1.txt # Use our version of file1, delete all their changes
$ git checkout --theirs -- file2.txt # Use their version of file2, delete all our changes