Created
April 4, 2014 15:12
-
-
Save ajcrites/9976720 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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