That’s why I built gguser – a simple CLI to manage Git profiles effortlessly!
- Quick profile switching
- Auto-switch per project
- Check active Git user
- SSH key support
Try it now: npm install -g gguser
GitHub: https://github.com/withshubh/gguser
1–5 of 5 posts
That’s why I built gguser – a simple CLI to manage Git profiles effortlessly!
- Quick profile switching
- Auto-switch per project
- Check active Git user
- SSH key support
Try it now: npm install -g gguser
GitHub: https://github.com/withshubh/gguser
I use this technique to use my personal identity by default, and my work identity with repos that are checked out under ~/$WORK
I even have git aliases that behave differently depending on which identity I'm using.
What’s the advantage of this over https://utf9k.net/blog/conditional-gitconfig/ ? I use this technique to use my personal identity by default, and my work identity with repos that are checked out under ~/$WORK I even have git aliases that behave differently depending on which identity I'm using.
- Work on multiple Git accounts across scattered directories
- Want a simple CLI-based profile switcher
- Prefer explicit control over which profile is used
- Don’t want to manually edit .gitconfig
- Need SSH key support per profile
With gguser, you can quickly switch profiles interactively, auto-switch based on any directory, and override profiles on the fly—without relying on folder-based rules.
If the .gitconfig method works for you, that’s great! :) But for devs who don’t want to tweak configs or need a more dynamic approach, gguser makes managing multiple Git identities effortless.
What’s the advantage of this over https://utf9k.net/blog/conditional-gitconfig/ ? I use this technique to use my personal identity by default, and my work identity with repos that are checked out under ~/$WORK I even have git aliases that behave differently depending on which identity I'm using.
Good point! Using Git’s conditional includes is a solid approach if your repos follow a strict directory structure. But gguser is designed to be more flexible and user-friendly, especially for developers who: - Work on multiple Git accounts across scattered directories - Want a simple CLI-based profile switcher - Prefer explicit control over which profile is used - Don’t want to manually edit .gitconfig - Need SSH ke…
Honestly, overriding profiles per repo sounds like a disaster waiting to happen for me. I'm pretty sure I'd check out a repo and forget to set the right identity for it at some point. But if it works better for you, it works better for you.
I'm curious: if you're not grouping repos in your filesystem according to which context they're from — which for me dictates which identity I want to use — how are you choosing which directories to store repos in? Or does the context not dictate which identity you want to use?
Earlier quoted context omitted.
Good point! Using Git’s conditional includes is a solid approach if your repos follow a strict directory structure. But gguser is designed to be more flexible and user-friendly, especially for developers who: - Work on multiple Git accounts across scattered directories - Want a simple CLI-based profile switcher - Prefer explicit control over which profile is used - Don’t want to manually edit .gitconfig - Need SSH ke…
I have per profile ssh keys, by setting core.sshCommand differently per profile, and passing a different ssh config file in each profile. Honestly, overriding profiles per repo sounds like a disaster waiting to happen for me. I'm pretty sure I'd check out a repo and forget to set the right identity for it at some point. But if it works better for you, it works better for you. I'm curious: if you're not grouping repos…
For me, my repos aren’t always neatly grouped by context. I might clone a work repo temporarily somewhere else or have open-source contributions scattered around. Rather than relying on predefined paths, I prefer explicitly linking profiles or switching manually when needed.
That said, if the .gitconfig + core.sshCommand method works perfectly for you, that’s awesome! But I’d still love for you to give gguser a try—it’s super lightweight, doesn’t modify your .gitconfig, and could be a handy tool for times when you need a quick profile switch or override without tweaking configs manually.
Would be curious to hear your thoughts if you try it out!:)