jmxdsw
Last Updated: September 14, 2017
·
16
· caseywebb
95ad0e8c265950b42db9569ad40cce0f

Shorter SSH Git Remotes using Aliased Hosts

git

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
Say Thanks
Respond
Filed Under