Skip to content

Instantly share code, notes, and snippets.

View nekath's full-sized avatar

Radosław Piątek nekath

View GitHub Profile
@nekath
nekath / pull_request.sh
Created May 9, 2016 18:59 — forked from devongovett/pull_request.sh
Bash script to make a pull request from the current git repository. Tries the upstream remote if possible, otherwise uses origin.
# put this in your .bash_profile
pull_request() {
to_branch=$1
if [ -z $to_branch ]; then
to_branch="master"
fi
# try the upstream branch if possible, otherwise origin will do
upstream=$(git config --get remote.upstream.url)
origin=$(git config --get remote.origin.url)