A CLI tool to manage git profiles (name, email, GPG key, commit signing) and activate them per project.
- Download the latest release from the releases page
- Add the binary to your PATH
# Download the binary
curl -L https://github.com/yourusername/gitprofile/releases/latest/download/gitprofile-linux-amd64 -o gitprofile
chmod +x gitprofile
sudo mv gitprofile /usr/local/bin/go install github.com/Scharxi/gitprofile@latestgitprofile add work --name "John Doe" --email "john@company.com" --gpg-key "ABC123" --signgitprofile listgitprofile use work- Store multiple git profiles with different configurations
- Set user name and email
- Configure GPG key and commit signing
- Apply profiles per repository
- Simple JSON-based storage in
~/.gitprofiles.json - Cross-platform support (Windows, macOS, Linux)
The profiles are stored in ~/.gitprofiles.json with the following structure:
{
"work": {
"name": "John Doe",
"email": "john@company.com",
"gpg_key": "ABC123",
"sign_commits": true
},
"personal": {
"name": "John Doe",
"email": "john@personal.com",
"sign_commits": false
}
}- Windows
- macOS
- Linux
MIT