Skip to content

Instantly share code, notes, and snippets.

@mbenford
Created December 2, 2014 23:43
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 mbenford/e3271c3c1e14e0515ad0 to your computer and use it in GitHub Desktop.
Save mbenford/e3271c3c1e14e0515ad0 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
if [ "$1" == "" ]; then
echo "fatal: pull request number must be provided"
exit 1
fi
branch="pr/$1"
if [ "$(git branch --list $branch)" == "" ]; then
echo "fatal: branch $branch not found"
exit 1
fi
git merge --no-ff -m "Merge PR #$1" $branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment