In global gitconfig -- on windows in Program Files/Git/etc
# xxxxxxx Projects
[includeIf "gitdir:<path to dir you're interested in>/**"]
path = path to specific gitconfig created for this project
Which tells git that if it's within my xxx directory, to load the gitconfig at that path, which looks like:
[user]
name = your name
email = email to use for this project
# Reconfigure SSH
[core]
sshCommand = ssh -F <path to ssh file>
Which modifies git's SSH command to use a custom SSH config, which looks like:
# Anglo American SSH Config
Host <???????> *
HostName ssh.dev.azure.com
User git
IdentityFile ~/.ssh/id_rsa_xxxxxxxxxxxxx
IdentitiesOnly yes
UserKnownHostsFile ~/.ssh/knownhosts_xxxxxxxxxxxxxx
Which tells SSH to use an identity file I created for xxxxxx, which looks like:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXkNOTACHANCEINHELLAAAAEbm9uZQAAAAAAAAABAAACFwAA
...