Skip to content

Instantly share code, notes, and snippets.

@jaywick
Created April 27, 2018 02:07
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 jaywick/97f05a421588bfca71ff975a9e12e78c to your computer and use it in GitHub Desktop.
Save jaywick/97f05a421588bfca71ff975a9e12e78c to your computer and use it in GitHub Desktop.
Run `git open` to open the branch your on online
[alias]
open = !powershell goto-remote.ps1
# only supports ssh remotes atm
$branch = git rev-parse --abbrev-ref HEAD;
$giturl = git remote get-url origin;
$httpurl = $giturl -replace "^git@(.+):(.+).git",'https://$1/$2';
explorer $httpurl/tree/$branch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment