Keep changes from only one side of a merge

suggest change

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents