Skip to content

Instantly share code, notes, and snippets.

@wtfil
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtfil/b555d7b8aee466674077 to your computer and use it in GitHub Desktop.
Save wtfil/b555d7b8aee466674077 to your computer and use it in GitHub Desktop.
open page of current branch in browser
> ./open-remote.sh
#!/bin/bash
BRANCH=`git rev-parse --abbrev-ref HEAD 2>/dev/null`
REMOTE=`git config --get remote.origin.url | sed -e 's/git@//' -e 's/.git//' -e 's/https:\/\///' -e 's/\:/\//'`
open https://$REMOTE/tree/$BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment