Created
April 23, 2017 11:55
-
-
Save bantya/2c8863b094ce6c32249c160353261d21 to your computer and use it in GitHub Desktop.
Git: Simple git clone helper for windows batch shell
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
@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