Create a Github Pull Request from the terminal
To simply create a Github Pull Request on the site from the current active directory use this snippet
function git_pull_request()
{
local NAME=`git rev-parse --abbrev-ref HEAD`
local PATH_REPO=`git remote show -n origin | grep Push | cut -d: -f2- | cut -d/ -f 1- | tr -d " " | cut -d. -f-2`
git push origin $NAME
echo $PATH_REPO
open $PATH_REPO/compare/$NAME
}
!!! This works only if you are using the HTTP URL.
You can probably find a more up to date version in my dotfiles