Skip to content

Instantly share code, notes, and snippets.

@morteako
Created October 8, 2019 11:31
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 morteako/5498510086eea3f77311747e8b209055 to your computer and use it in GitHub Desktop.
Save morteako/5498510086eea3f77311747e8b209055 to your computer and use it in GitHub Desktop.
function compare() {
baseurl="https://github.com/"
remote=$(git remote get-url origin)
tempRepo=${${remote}#"git@github.com:"}
repo=${${tempRepo}%".git"}
branchname=$(git rev-parse --abbrev-ref HEAD)
url=$baseurl$repo"/compare/"$branchname
eval "open -a 'Google Chrome' $url"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment