Shorter SSH Git Remotes using Aliased Hosts
Typically, when cloning or setting the url for a GitHub repo accessed via SSH, you have something like...
$ git clone git@github.com:caseyWebb/my-cool-repo
...but, if you alias the GitHub host in ~/.ssh/config
as such...
Host gh
HostName github.com
User git
...your remotes can be much shorter...
$ git clone gh:caseyWebb/my-cool-repo
Written by Casey Webb
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#