Skip to content

Instantly share code, notes, and snippets.

@etoews etoews/
Created Mar 31, 2017

What would you like to do?
prat: a bash function to rapidly submit a pull request
# Usage: prat my-feature-branch "My commit (and pull request message)"
# Requirements:
function prat()
git diff
read -e -p "You sure? " SURE
if [[ "$SURE" == "y" ]]; then
git checkout -b $BRANCH
git add .
git commit -m "$MESSAGE"
git push -u
PR_URL=$(hub pr -m "$MESSAGE")
echo $PR_URL
open $PR_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.