Created
August 21, 2010 17:01
-
-
Save livingston/542567 to your computer and use it in GitHub Desktop.
GIT Tools
This file contains hidden or 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
#!/usr/bin/sh | |
#Short command to clone a git repository | |
## USAGE: gc git://github.com/livingston/rotator.git | |
## this command will clone the git repo in a folder of the format {GITHUB_USER-NAME}_{REPO-NAME} | |
gc() | |
{ | |
str=$1 | |
uvar=`echo $str | sed s:\.git::g | awk -F '/' '{printf("%s_%s", $3, $4)}'` | |
git clone $str $uvar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment