Skip to content

Instantly share code, notes, and snippets.

@alexengrig
Last active March 17, 2022 22:34
Show Gist options
  • Save alexengrig/489ffe5d18f3c04e05c495c898c4ee68 to your computer and use it in GitHub Desktop.
Save alexengrig/489ffe5d18f3c04e05c495c898c4ee68 to your computer and use it in GitHub Desktop.
Several git configs by git directory
# Add to ~/.gitconfig
[includeIf "gitdir:~/path/to/directory/first/"]
path = .gitconfig-1
[includeIf "gitdir:~/path/to/directory/second/"]
path = .gitconfig-2
# Example .gitconfig-1
[user]
email = my1@email.mail
name = My Name 1
# Example .gitconfig-2
[user]
email = my2@email.mail
name = My Name 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment