Last active
July 4, 2019 14:35
-
-
Save debidatta/35f9e0dcf3b8db2bc4ca to your computer and use it in GitHub Desktop.
Merging two branches with priority in conflict resolution
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
# If you want to keep changes of the current branch | |
grep -lr '<<<<<<<' . | xargs git checkout --ours | |
# If you want to keep the changes of the branch that is being merged | |
grep -lr '<<<<<<<' . | xargs git checkout --theirs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment