Skip to content

Instantly share code, notes, and snippets.

@vhanla
Created October 16, 2016 01:15
Show Gist options
  • Save vhanla/a0dfb064c740474bd85e2e2058432321 to your computer and use it in GitHub Desktop.
Save vhanla/a0dfb064c740474bd85e2e2058432321 to your computer and use it in GitHub Desktop.
Launch git remote url batch (.cmd / .bat)
@echo off
::Author : vhanla
::Filename : giturl.cmd
::Description : gets remote url inside a git directory and opens it in the default web browser
::Requirement : Windows
::alternative git command: git config --get remote.origin.url
for /f "tokens=*" %%i in ('git ls-remote --get-url ^') do (echo Opening %%i ... & start "" %%i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment