gc - another shell alias
Wouldn’t it be nice to have a alias for cloning a git repo and change to cloned directory?
Here it is:
# clones git and change to new dir
alias gc='_gc(){ git clone $1 && cd `echo "$1" \
| sed -E "s|.*/([a-zA-Z0-9\\-]+)\.git|\1|"`; }; _gc'
Usage:
$ gc <CLONE-URL>