C port with security hardening for developers working with multiple Git accounts, ensuring credentials never leak between identities. Features comprehensive SSH/GPG isolation, health checking, and secure configuration management.
📦 Installation Options
🎯
RHEL/CentOS/Rocky/Alma/Fedora
🚀 RPM Install
# Add repository
sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
# Install package
sudo dnf install gitswitch
# Add a new Git identity
gitswitch add
🏛️
Arch Linux
🏛️
AUR Package Available
# Install using yay
yay -S gitswitch-c
# Or using paru
paru -S gitswitch-c
# Add a new Git identity
gitswitch add
Full Usage Documentation
Usage: gitswitch [OPTIONS] [COMMAND] [ARGS]
Complete Git Identity Management
Safe git identity switching with actual git configuration management
Commands:
add Add new account interactively
list, ls List all configured accounts
remove
Remove specified account
status Show current account status
doctor, health Run comprehensive health check
config Show configuration file information
Switch to specified account
Options:
--global, -g Use global git scope
--local, -l Use local git scope (default)
--dry-run, -n Show what would be done without executing
--verbose, -V Enable verbose output
--debug, -d Enable debug logging
--color, -c Force color output
--no-color, -C Disable color output
--help, -h Show this help message
--version, -v Show version information
Examples:
gitswitch add # Add new account interactively
gitswitch list # List all accounts
gitswitch 1 # Switch to account ID 1
gitswitch work # Switch to account matching 'work'
gitswitch remove 2 # Remove account ID 2
gitswitch doctor # Run health check
Key Features:
- Secure TOML configuration management
- Interactive account creation with validation
- Comprehensive account health checking
- SSH/GPG key validation and security checks
- Atomic configuration file operations
- Safe file permission handling
- Actual git configuration switching
- Repository detection and scope management
- Git configuration validation and testing