| Crates.io | git-identity |
| lib.rs | git-identity |
| version | 0.1.1 |
| created_at | 2026-01-06 00:53:22.18114+00 |
| updated_at | 2026-01-06 01:19:47.310043+00 |
| description | A CLI tool for managing git identity profiles. Quickly switch between different git identities (name, email, signing key) on a per-repository basis. |
| homepage | https://github.com/vepr-ua/git-identity |
| repository | https://github.com/vepr-ua/git-identity |
| max_upload_size | |
| id | 2024879 |
| size | 36,254 |
A CLI tool for managing git identity profiles. Quickly switch between different git identities (name, email, signing key) on a per-repository basis.
cargo install --path .
Use git-indentity command as it is or add a git alias!
[alias]
identity = !git-identity
git-identity list
# or with git alias
git identity list
Output:
Available git identities:
- personal
* work
The * indicates the currently active identity for the repository.
Use -v for verbose output with full details:
git-identity list -v
git-identity set work
This applies the identity to the current repository's local git config.
Create a profiles file at ~/.git-identities/profiles:
[identity "personal"]
name = Your Name
email = you@personal.com
[identity "work"]
name = Your Name
email = you@company.com
signingkey = ABC123
| Option | Description | Required |
|---|---|---|
name |
The git user.name value |
Yes |
email |
The git user.email value |
Yes |
signingkey |
The git user.signingkey for commits |
No |
git-identity list reads profiles from ~/.git-identities/profiles and displays them. It also checks the current repository's git config to show which identity is active.
git-identity set <name> finds the matching profile and writes user.name, user.email, and optionally user.signingkey to the current repository's local .git/config.
Contributions are welcome! The codebase is documented with rustdoc comments. Run cargo doc --open to browse the documentation.
src/
main.rs # CLI entry point and argument parsing
identity.rs # Core identity management logic
error.rs # Error types
Big thanks to Micah for the inspiration for this project. See Micah's blog post for Setting Up Git Identities.