[Feature]: Folder/project-based Git profile support #11921
SrirajBehera
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem or use case
I originally started using T3 Code only for personal projects, but I've liked the workflow enough that I now want to use it for my work projects as well.
I use separate Git profiles/identities for personal and work repositories. My Git CLI is already configured so that repositories under my work folder use my work profile.
However, when I open those projects through T3 Code, that folder-specific Git configuration does not seem to be picked up. T3 Code continues to use my personal Git profile by default.
This makes using T3 Code across both personal and work repositories difficult, since commits or other Git operations can end up using the wrong identity.
Proposed solution
Add support for folder/project/repository-based Git profiles.
Ideally, T3 Code should first respect the Git configuration that already resolves for the project's working directory.
For example, if my machine is configured roughly like:
~/personal/**→ Personal Git profile~/work/**→ Work Git profilethen opening a repository under
~/work/in T3 Code should automatically use the Git identity/configuration that Git itself resolves for that repository.Additionally, T3 Code could optionally expose the resolved Git profile in the project settings and allow users to override it on a per-project basis.
Something like:
Project → Git Profile
The selected/resolved profile should then be used consistently for Git operations performed from that project/worktree.
Why this matters
It's common for developers to use the same machine for both personal and work development while keeping separate Git identities, accounts, SSH keys, signing keys, or other Git configuration.
T3 Code already organizes work around projects/repositories, so Git identity feels like something that should naturally follow the project rather than being globally fixed.
It would also make it much safer to use T3 Code across multiple GitHub organizations/accounts without accidentally creating commits using a personal identity in a work repository, or vice versa.
Smallest useful scope
The smallest useful implementation would be:
Respect the Git configuration resolved from the project's working directory instead of always relying on a single/global Git profile.
A project-level profile selector/override could be added later if needed.
Alternatives considered
Manually switching the Git profile/configuration before using T3 Code works, but it adds friction and is easy to forget when frequently switching between personal and work projects.
Maintaining separate T3 Code environments for personal and work usage would also solve the isolation problem, but feels unnecessary when Git already supports repository/folder-specific configuration.
Risks or tradeoffs
Git configuration can come from multiple levels (
system,global,local, conditional includes, environment variables, etc.), so T3 Code would need to make sure it respects Git's normal configuration resolution rather than implementing a separate profile-resolution mechanism.Showing the currently resolved Git identity somewhere in the UI could also help make the behavior explicit.
Contribution
I'd be open to helping test this, especially with a setup that uses separate personal and work Git configurations.
All reactions