Hacker News Clone new | comments | show | ask | jobs | submit | github repologin
How I configure my Git identities (www.benji.dog)
66 points by 8organicbits 1 hour ago | hide | past | web | 9 comments | favorite





you don't have to mess with ~/.ssh/config

Just put this in your ~/.gitconfig (or ~/.config/git/personal as in the article)

  [core]
      sshCommand = /usr/bin/ssh -o IdentitiesOnly=yes -i ~/.ssh/IdentityFile2 -a

This makes submodules easy without the `insteadOf`

And if you have more than one SSH identity?

You can also put that in your includeIf confs. I updated the parent comment

Sounds like a different problem.

The includeIf stuff is pretty neat. I currently keep the SSH complexity in ~/.ssh, where I have several includes, one for each customer|project|identity. Things without unique hostnames, like github, get an alias assigned:

    Host customer-github
     Hostname github.com
     IdentityFile ~/.ssh/customer_rsa
     User git
All I have to do is use the alias in any git clone command and I'm done.

So glad I clicked on this link. I was already doing the `includeIf: "gitdir"` thing to separate work and personal stuff, but `hasconfig:remote` is a total game-changer.

absoluelty! I can't believe this treasure was hidden as a draft for three years!

I really liked the website, the layout, typography, icons etc. Really well done!

Especially the TLD

The whole domain name for me, my childhood dog was named Benji :)

... time to go change my security questions




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: