Skip to content

Instantly share code, notes, and snippets.

@emperorcezar
Created September 13, 2018 18:57
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 emperorcezar/62aeba58965b9744f1b50e62723dbea6 to your computer and use it in GitHub Desktop.
Save emperorcezar/62aeba58965b9744f1b50e62723dbea6 to your computer and use it in GitHub Desktop.
Open pull request url from command line on mac
#!/bin/bash
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BASE_URL=$(git config remote.origin.url | sed "s/git@\(.*\):\(.*\).git/https:\/\/\1\/\2/")
open ${BASE_URL}/compare/${BRANCH}?expand=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment