Last Updated: September 14, 2017
· caseywebb

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

...but, if you alias the GitHub host in ~/.ssh/config as such...

Host gh
  User git

...your remotes can be much shorter...

$ git clone gh:caseyWebb/my-cool-repo