Artboard 16light, inspiration, solution, idea, innovation,Google Sheets iconSwift icon
Published at
Updated at
Reading time
This post is part of my Today I learned series in which I share all my web development learnings.

I just came across Marcus Crane's post Conditionally setting your gitconfig. Marcus explains how to use conditional includes and apply directory dependent git configuration.

Here's an example from his blog post:

  email =
  name = User
  signingkey = ABC123
  gpgSign = true
[includeIf "gitdir:~/work/"]
  path = ~/.work.gitconfig

The git docs describe that you include configs depending on branch name, too.

I don't need different git configurations these days, but it's good to know this feature exists. ๐Ÿ‘

Related Topics

Related Articles