Skip to content

Instantly share code, notes, and snippets.

@Tazminia
Created December 12, 2023 15:22
Show Gist options
  • Save Tazminia/9fb6a6a2acfe93be9626cfa5af8741f1 to your computer and use it in GitHub Desktop.
Save Tazminia/9fb6a6a2acfe93be9626cfa5af8741f1 to your computer and use it in GitHub Desktop.
Path based git configuration
######################################
# Content of ~/.gitconfig #
######################################
[includeIf "gitdir:~/personal/"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
######################################
# Content of ~/.gitconfig-personal #
######################################
[user]
name = me
email = peronal-email@mail.com
######################################
# Content of ~/.gitconfig-work #
######################################
[user]
name = me
email = work-email@company.com
@Tazminia
Copy link
Author

path based git configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment