Gitup 🚀
Manage your Git identity across multiple accounts and projects.
gitup is cross-platform CLI tool designed to check, install, and manage your Git configurations with ease. The profile management, allows to switch between work, personal, and other Git accounts with a single command.
Table of Contents
Key Features
- Git Installation Check: Verifies if Git is installed on your system.
- Cross-Platform Guidance: If Git is not installed,
gitupprovides the correct installation command for your OS (supports Debian/Ubuntu, Fedora/RHEL, Arch Linux, macOS, and Windows). - Interactive Setup: A guided
gitup setupcommand for new users that also offers to save the configuration as a profile. - Effortless Profile Management: Save multiple Git configurations (e.g., for 'work' and 'personal' use) and switch between them seamlessly.
- Interactive Switching: Simply run
gitup useto get an interactive list of profiles to choose from. - Script-Friendly: A global
--jsonflag provides machine-readable output for all commands, and configuration can be set via environment variables. - Secure by Design: Does not require or execute commands with
sudoitself; it empowers the user to run provided installation commands securely.
Installation
You will need the Rust toolchain (version 1.65 or newer) installed.
-
Install from Crates.io (Recommended):
-
Build from Source:
# Clone the repository ) # Build the release binary # The executable will be at `target/release/gitup` # Consider moving it to a directory in your PATH
Usage
Initial Setup
For first-time use, the setup command is the best starting point. It will guide you through setting your name and email and then ask if you want to save it as your first profile.
Checking Configuration
To see your current global user.name/user.email and the active gitup profile.
Alias: gitup status
Profile Management
This is the core feature for managing multiple Git identities.
Switch Profiles (Easy Switch)
Run use without a name to get an interactive selector. This is the easiest way to switch contexts.
Or switch directly if you know the name:
Save a New Profile
This command reads your current global Git configuration and saves it as a named profile.
# First, ensure your global config is what you want to save
# Then, save it
List All Saved Profiles
Alias: gitup ls
You will see a list of your profiles, with the active one highlighted.
Saved Profiles
- personal
- work (active)
Show the Active Profile
Alias: gitup active
Delete a Profile
Alias: gitup rm
Non-Interactive Configuration
For use in scripts or CI/CD environments.
# Set config using long flags
# Or with short flags
# Flags can also be populated from environment variables
Configuration
gitup stores its profile data in a simple JSON file located at:
- Linux/macOS:
$HOME/.config/gitup/config.json - Windows:
{FOLDERID_RoamingAppData}\gitup\config.json
You can view this file to see all your saved profiles, but it is recommended to manage it through the CLI commands.
Author
Lucian BLETAN