Skip to content

Instantly share code, notes, and snippets.

@stilliard
Last active June 7, 2018 01:21
Show Gist options
  • Save stilliard/7734f83d63dfcb08021a22522b60d14e to your computer and use it in GitHub Desktop.
Save stilliard/7734f83d63dfcb08021a22522b60d14e to your computer and use it in GitHub Desktop.
git alias to show link to create or view pull request for current branch
pr = "!f() { git remote get-url origin | sed 's/[email protected]://g' | sed 's/.git//g' | awk '{print \"https://github.com/\"$1\"/pull/'$(git rev-parse --abbrev-ref HEAD)'\"}'; }; f"
pr = "!f() { exo-open $(git remote get-url origin | sed 's/[email protected]://g' | sed 's/.git//g' | awk '{print \"https://github.com/\"$1\"/pull/'$(git rev-parse --abbrev-ref HEAD)'\"}'); }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment