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` 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 👍

Das habe ich irgendwann mit direnv hingebogen, weil ich diese Lösung nicht kannte. Nun frage ich mich, ob ich es ändern sollte. ;)

@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

Fast, secure and up-to-date instance, welcoming everyone around the world. Join us! 🌍
Up since 04/04/2017. ✅

Why should you sign up on

This instance is not focused on any theme or subject, feel free to talk about whatever you want. Although the main language is english, we accept every single language and country.

We're connected to the whole ActivityPub fediverse and we do not block any foreign instance nor user.

We do have rules, but the goal is to have responsible users.

The instance uses a powerful server to ensure speed and stability, and it has good uptime. We follow state-of-the-art security practices.

Also, we have over 300 custom emojis to unleash your meming potential!

Looking for a Kpop themed instance? Try