Skip to content

Instantly share code, notes, and snippets.

@akhansari
Last active June 7, 2022 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhansari/80995fc5dc0f12ebf7ba38e7c7941a9e to your computer and use it in GitHub Desktop.
Save akhansari/80995fc5dc0f12ebf7ba38e7c7941a9e to your computer and use it in GitHub Desktop.
Multiple Git Configs
[core]
excludesFile = ~/.gitignore
[user]
name = My Name
[includeIf "gitdir:~/git/"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/github/"]
path = ~/.gitconfig-home
Host mydomain mydomain.com
HostName mydomain.com
IdentityFile ~/.ssh/id_rsa
Host github github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment