Skip to content

Instantly share code, notes, and snippets.

@t3h2mas
Created July 26, 2020 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t3h2mas/9178afa9ef08c92c0f46336714770768 to your computer and use it in GitHub Desktop.
Save t3h2mas/9178afa9ef08c92c0f46336714770768 to your computer and use it in GitHub Desktop.
Open the github new PR form in a browser for the current branch (mac)
#!/bin/bash
org="$(git remote get-url origin | cut -d '/' -f 4)"
repo="$(basename $(git rev-parse --show-toplevel))"
branch="$(git rev-parse --abbrev-ref HEAD)"
open "https://github.com/${org}/${repo}/pull/new/${branch}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment