Follow

TIL about "Git conditional includes" [1]. You can setup specific Git configs based on your filesystem location. Here's an example:

~/.gitconfig
[includeIf "gitdir:personal/"]
path = .gitconfig-personal
[includeIf "gitdir:work/"]
path = .gitconfig-work
[user]
email = Your default email

~/.gitconfig-personal
[user]
email = Your personal email

~/.gitconfig-work
[user]
email = Your work email

[1] kevinkuszyk.com/2018/12/10/git

Sign in to participate in the conversation
nitro-fucking-horse

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!