Skip to content

Instantly share code, notes, and snippets.

@livingston
Created August 21, 2010 17:01
Show Gist options
  • Save livingston/542567 to your computer and use it in GitHub Desktop.
Save livingston/542567 to your computer and use it in GitHub Desktop.
GIT Tools
#!/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