A command-line tool for managing multiple Git configurations. Switch between different Git user profiles easily for work, personal projects, or different organizations.
- 🔄 Switch between multiple Git profiles quickly
- 📝 Interactive profile creation and management
- 📋 List all available profiles
- 🎯 Show current active profile
- 🗑️ Remove profiles when no longer needed
- 💾 Persistent configuration storage
git clone <repository-url>
cd git-ps
cargo build --releaseThe binary will be available at target/release/git-ps.
To use git-ps from anywhere, add the binary to your PATH or copy it to a directory already in your PATH:
cp target/release/git-ps /usr/local/bin/git-ps listgit-ps current# Interactive selection
git-ps use
# Direct switch (if profile exists)
git-ps use work-profilegit-ps addThis will interactively prompt you for:
- Profile name
- Git user name
- Git email address
# Interactive selection
git-ps remove
# Direct removal (if profile exists)
git-ps remove old-profileProfiles are stored in your system's configuration directory:
- macOS:
~/Library/Application Support/git-ps/ - Linux:
~/.config/git-ps/ - Windows:
%APPDATA%\git-ps\
The configuration file is named profiles.yaml and contains all your saved Git profiles.
-
Add your work profile:
git-ps add # Enter: work, John Doe, [email protected] -
Add your personal profile:
git-ps add # Enter: personal, John Doe, [email protected] -
Switch between profiles:
git-ps use work # Switch to work profile git-ps use personal # Switch to personal profile
-
Check current profile:
git-ps current
- Rust 1.70+ (for building from source)
- Git (the tool manages Git configurations)
clap- Command-line argument parsingserde&serde_yaml- Configuration serializationanyhow- Error handlingdirs- Cross-platform directory pathsinquire- Interactive prompts
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.