Skip to content

Instantly share code, notes, and snippets.

@bantya
Created April 23, 2017 11:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bantya/2c8863b094ce6c32249c160353261d21 to your computer and use it in GitHub Desktop.
Save bantya/2c8863b094ce6c32249c160353261d21 to your computer and use it in GitHub Desktop.
Git: Simple git clone helper for windows batch shell
@echo off
rem http://stackoverflow.com/questions/7005951/batch-file-find-if-substring-is-in-string-not-in-a-file
set url=%1
set location=%2
echo %url% | find /I ".git">Nul
if errorlevel 1 (
set url=%url%.git
)
git clone %url% %location%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment