Skip to content

Instantly share code, notes, and snippets.

@madmax
Created July 2, 2012 10:55
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 madmax/3032685 to your computer and use it in GitHub Desktop.
Save madmax/3032685 to your computer and use it in GitHub Desktop.
#!/bin/bash
GITHUB_USER="madmax"
if [ "$1" != "" ]; then
echo "Merging pull request $1"
OUT=`basename $1`
curl --user $GITHUB_USER $1.patch > $OUT.patch
git am -s --3way --ignore-space-change $OUT.patch
rm $OUT.patch
else
echo "No parameters given, exiting..."
echo ""
echo "Usage: $0 <url>"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment