Created
November 13, 2019 21:29
-
-
Save sfdcale/0c13d3cb33d639c87c7d27ff72ccc8cb to your computer and use it in GitHub Desktop.
Script to resolve conflicts during git merge using their strategy
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
| #!/bin/bash | |
| rm -f "out.txt" | |
| git diff --name-only --diff-filter=U > out.txt | |
| while IFS= read -r fileName | |
| do | |
| echo "$fileName" | |
| git checkout --theirs "$fileName" | |
| done < out.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment