TIL – Using conditional entries in .gitconfig to automatically manage identities based on the working directory. Nice!

@jomo What is the benefit compared to `using git config"Firstname Lastname"` and `git config [email protected]` while being in `~/work/`? This will be stored in `~/work/.git/config`

@lx242 @jomo this works for all repositories below ~/work, not just one.

@clonejo @jomo Ah, got it. Thanks for the clarification. Might indeed spare some headache.

@lx242 @jomo Neat idea. I switch computers all the time and forgetting to set this happens all the time 👍

@jomo oh wow, thanks, I definitely didn't know about this and it will be very useful! thanks again!

@jomo @schm interesting. I use direnv for exactly the purpose described in the screenshot, I’ll keep it mind should this not be enough though.

Sign in to participate in the conversation

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