Skip to content

Instantly share code, notes, and snippets.

@yiplee
Forked from zbyhoo/solve_pbxproj_merge_conflict.sh
Last active August 29, 2015 14:17
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 yiplee/c7a4e1ca9f7bcebdd8db to your computer and use it in GitHub Desktop.
Save yiplee/c7a4e1ca9f7bcebdd8db to your computer and use it in GitHub Desktop.
#!/bin/sh
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
cp $projectfile $savefile
mv $tempfile $projectfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment