Skip to content

Instantly share code, notes, and snippets.

@seanf
Last active December 19, 2015 06:59
Show Gist options
  • Save seanf/5915816 to your computer and use it in GitHub Desktop.
Save seanf/5915816 to your computer and use it in GitHub Desktop.
Push current branch to github, enable tracking and open the pull request page
#!/bin/bash
this_branch=$(git rev-parse --abbrev-ref HEAD)
github_project=https://github.com/zanata/zanata-server
base_branch=integration/master
read -p "Push branch \"$this_branch\" to github, enable tracking, and open pull request page (y/n)? " -n 1 -r choice
if [[ $choice =~ ^[Yy]$ ]]; then
git push -u origin $this_branch
xdg-open ${github_project}/compare/${base_branch}...${this_branch}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment