News for hackers. Stuff that matters.
Re:Setting up Git identities by neilpa on Tuesday March 24, 2020 @11:33AM (#22675427)
You can extend this trick further by specifying the User in your SSH config to make for even shorter URLs.

  Host gh-me
    Hostname github.com
    User git
    IdentityFile ~/.ssh/id_rsa

  Host gh-work
    Hostname github.com
    User git
    IdentityFile ~/.ssh/id_rsa_work
Then all you need is a `git clone gh-me:org/repo` or `git clone gh-work:work/repo`. I've been using this for sometime and it's not too hard to remember. Although when I don't it's easy enough to fix the origin url by editing `.git/config`.

There are no comments on this comment yet.