Created
October 3, 2015 07:06
-
-
Save devigned/265a2d0a15e42ac2f841 to your computer and use it in GitHub Desktop.
A little PowerShell script to jump to a github repo given the remote name
This file contains 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
function GitHub { | |
Param | |
( | |
[CmdletBinding()] | |
[parameter(Mandatory=$true)] | |
[String] | |
$remote | |
) | |
$loc = (git remote show $remote | Select-String -Pattern "Fetch URL: (.+?)github.com[:|/](?<fork>.*)\.git" | select -expand Matches | foreach { $_.groups["fork"].value }) | |
Start "http://github.com/$loc" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment