SSH Host Aliases in Git Remotes
Today I learned… that you can use SSH host aliases in git remote URLs! First of all, here is my problem and use case: I want to be able to have multiple remotes in a local git repo with different logins and of course different SSH keys, because I use one pair of SSH keys per connection. For repositories with only one remote I used to set core.sshCommand. This applies to every remote you configure. You could use the GIT_SSH_COMMAND environment variable on the command line to overwrite the core.sshCommand setting, because it would be prioritized. This could be done by writing it on the command line manually, or by using a shell alias, or git alias. None of these options are really practical in everyday use. ...