Last active
October 9, 2018 10:05
-
-
Save wikiti/9ebb0755dce5d63444019b99b4575e23 to your computer and use it in GitHub Desktop.
Resolve a binary conflict when performing merges. Of course, this works too for plain text files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this commands after a git merge conflict, if you can't | |
# (or don't want to) fix the conflicts on some files. | |
# To use the base branch's file, use this: | |
git checkout --ours -- path/to/your/file.ext | |
git add path/to/file.ext | |
# To use the compare branch's file, use this: | |
git checkout --theirs -- path/to/your/file.ext | |
git add path/to/file.ext | |
# For example: | |
git checkout --theirs -- spec/fixtures/example.docx | |
git add spec/fixtures/example.docx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment