Created
April 27, 2018 02:07
-
-
Save jaywick/97f05a421588bfca71ff975a9e12e78c to your computer and use it in GitHub Desktop.
Run `git open` to open the branch your on online
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
open = !powershell goto-remote.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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