Skip to content

Instantly share code, notes, and snippets.

@vojtaBelovsky
Last active July 29, 2019 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vojtaBelovsky/0be156ff37929e16f55f253d8a97d808 to your computer and use it in GitHub Desktop.
Save vojtaBelovsky/0be156ff37929e16f55f253d8a97d808 to your computer and use it in GitHub Desktop.
# Copy resolve_conflicts.sh file to the root of your project ( where .xcodeproj package is )
# Open terminal, navigate to the project's folder and run the script using command: sh resolve_conflicts.sh
# All credits goes to Sergey Chehuta
projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"
cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
mv $tempfile $projectfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment