Requirements:
- hub (https://github.com/github/hub)
- copy
git-pull-reqinto/usr/local/bin
Usage:
git co -b my-branch
git commit -a "My commit"
git push origin my-branch
git pull-req # sends a pull-req from origin/my-branch into origin/master
Requirements:
git-pull-req into /usr/local/binUsage:
git co -b my-branch
git commit -a "My commit"
git push origin my-branch
git pull-req # sends a pull-req from origin/my-branch into origin/master
| #!/usr/bin/env bash | |
| function __github_current_branch { | |
| echo "$1`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`" | |
| } | |
| function __github_remote_origin { | |
| echo "$1`git remote -v | grep "(push)" | sed "s#origin.*:\([^/]*\).*push.*#\1#"`" | |
| } | |
| git fetch origin && hub pull-request -h $(__github_remote_origin):$(__github_current_branch) |