Last active
January 16, 2022 18:58
-
-
Save calebjenkins/94e31a8cc69010a4e534289f84b08641 to your computer and use it in GitHub Desktop.
a PowerShell method to open the origin git URL in the browser from inside the git folder. Only works from the root git folder.
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 GitW { | |
$repoUrl = git config --get remote.origin.url | |
if(!$repoUrl) | |
{ | |
Write-Output " No git URL found" | |
break | |
} | |
# Start-Process chrome $repoUrl # Google Chrome | |
# Start-Process msedge $repoUrl # Microsoft Edge | |
Start-Process $repoUrl # Opens http handler (browser) on Windows | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment