Skip to content

Instantly share code, notes, and snippets.

@ajcrites
Created April 4, 2014 15:12
Show Gist options
  • Save ajcrites/9976720 to your computer and use it in GitHub Desktop.
Save ajcrites/9976720 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
#
# Installation of `hub` is required
#
# Create a pull request for the same user with the specified branches
if [ -z $1 ]; then
read -n1 -p "Will use current branch. (Ctrl+c to cancel)"
branch=$(git rev-parse --abbrev-ref HEAD)
else
branch=$1
fi
user_or_org=${2:-Mobiquity}
source_or_org=${3:-$user_or_org}
git checkout develop
git pull
git rebase develop $branch
git push origin $branch
hub pull-request -b ${user_or_org}:develop -h ${source_or_org}:$branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment