Skip to content

Instantly share code, notes, and snippets.

@calebjenkins
Last active January 16, 2022 18:58
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 calebjenkins/94e31a8cc69010a4e534289f84b08641 to your computer and use it in GitHub Desktop.
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.
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