Created
January 13, 2012 21:15
-
-
Save dstnbrkr/1608740 to your computer and use it in GitHub Desktop.
git-merge-combine
This file contains 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/sh | |
# Combines two versions of a file by removing all conflict markers | |
# Usage: git-merge-combine MyProject.xcodeproj/project.pbxproj | |
FILE=$1 | |
TMPFILE=$1.tmp | |
sed -e 's/<<<<<<< HEAD//; s/=======//g; s/>>>>>>> .*$//' $FILE > $TMPFILE | |
if [ $? -ne 0 ]; then | |
exit; | |
fi | |
mv $TMPFILE $FILE | |
git add $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment