Skip to main content
 

Conditional .gitconfig

Add the following lines to ~/.gitconfig to load configuration only for repositories within a certain location:

[includeIf "gitdir:~/dev/work/"]
path = ~/dev/work/.gitconfig


For example, this can be used to set work email and signing keys.