Last Updated: September 09, 2019
·
2.156K
· tuxcanfly

Pretty urls in git clone

Yes, you don't need to go to that github page and copy the clone url again, just use this config

git config --global url.git@github.com.insteadOf gh

git config --global url.git@bitbucket.org.insteadOf bb

and use

git clone gh:octocat/Spoon-Knife
git clone bb:mchaput/whoosh

More: https://www.kernel.org/pub/software/scm/git/docs/git-config.html (search for insteadOf)

2 Responses
Add your response

I have this in my .gitconfig

[url "git@github.com"]
  insteadOf = gh
over 1 year ago ·

yup, using the git config --global writes to your ~/.gitconfig

over 1 year ago ·