Keep changes from only one side of a merge
suggest changeDuring 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents