Command: github-clone
Cloning code from github is a frequent action for us, it's boring to type git clone git@github.com:someone/somerepo
, or copy & paste the url from the project page. So I make a simple function in my .zshrc
:
function github-clone() {
git clone git@github.com:$1.git $2
}
Now you just need to type github-clone someone/repo
to clone, quick and easy!
Written by Reorx
Related protips
1 Response
There are 2 ways to do it better:
-
use address alias (add this to
.gitconfig
and then use itgit clone gh:name/repo
):[url "git@github.com"] insteadOf = gh
use Hub
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Zsh
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#