Skip to content

Instantly share code, notes, and snippets.

@bradymholt
Created April 12, 2016 22:48
Show Gist options
  • Save bradymholt/4261a6c181931b6e32172d35b9743ed6 to your computer and use it in GitHub Desktop.
Save bradymholt/4261a6c181931b6e32172d35b9743ed6 to your computer and use it in GitHub Desktop.
Open GitHub Pull Request in Browser for Current Working Branch
#!/bin/bash
# Opens GitHub PR for the current branch
BRANCH=$(git branch | grep ^* | sed 's/* //' )
URL="https://github.$(git config remote.origin.url | cut -f2 -d. | tr ':' /)/pull/${BRANCH}"
open $URL%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment