No description
  • C# 90.6%
  • Shell 5.9%
  • Batchfile 3.1%
  • PowerShell 0.4%
Find a file
Marvin Mees 00d6af4cce
All checks were successful
Continous Integration / build-and-test (push) Successful in 25s
Merge pull request 'ci: migrate pipeline to Cake Frosting build' (#4) from ci/cake-build into main
Reviewed-on: #4
2026-07-31 11:11:53 +00:00
.forgejo/workflows ci: migrate pipeline to Cake Frosting build 2026-07-31 13:04:00 +02:00
build ci: migrate pipeline to Cake Frosting build 2026-07-31 13:04:00 +02:00
src Increase version to 1.0 2026-05-28 14:32:02 +02:00
.gitignore Added .gitignore 2026-05-23 16:48:29 +02:00
build.ps1 ci: migrate pipeline to Cake Frosting build 2026-07-31 13:04:00 +02:00
build.sh ci: migrate pipeline to Cake Frosting build 2026-07-31 13:04:00 +02:00
CLAUDE.md Adjusted workflows 2026-06-22 19:27:01 +02:00
install.bat Added install scripts and adjusted the README.md 2026-06-23 13:33:04 +02:00
install.sh Added install scripts and adjusted the README.md 2026-06-23 13:33:04 +02:00
README.md Added install scripts and adjusted the README.md 2026-06-23 13:33:04 +02:00

GCM - Git Configuration Manager

Latest release Last commit .NET Platforms

A CLI tool that manages different named git configurations and applies them on demand.

Installation

Download the latest release for your platform and put the gcm binary on your PATH.

Linux / macOS

curl -fsSL https://git.mmtsc.de/marvinmees/GCM/raw/branch/main/install.sh | sh

Installs gcm to ~/.local/bin and marks it executable. Override the target with GCM_INSTALL_DIR, or pin a version with GCM_VERSION (e.g. v1.2.0).

Windows

Download and run install.bat, or from a terminal:

curl -fsSL https://git.mmtsc.de/marvinmees/GCM/raw/branch/main/install.bat -o install.bat && install.bat

Installs gcm.exe to %LOCALAPPDATA%\Programs\gcm. The same GCM_INSTALL_DIR and GCM_VERSION overrides apply.

Manual

Grab the binary for your OS/architecture (linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64) from the releases page, rename it to gcm (gcm.exe on Windows), mark it executable, and put it on your PATH.

Usage

gcm add --name <name>     Add a new configuration interactively
gcm remove <name>         Remove a named configuration
gcm apply <name>          Apply a configuration in the current directory
gcm list                  List saved configurations
gcm auto                  Auto-detect and apply config matching remote hostnames

The add command opens an interactive browser of git config settings organized by category. For each setting you pick, you are prompted for a value:

  • String settings get a text prompt
  • Boolean settings (e.g. core.ignorecase) show a true/false radio selection
  • Multi-choice settings (e.g. color.ui) show available options as radio buttons
  • A Custom key option lets you enter any arbitrary key-value pair

Examples

# Create a "Github" profile (browse categories, pick settings, enter values)
gcm add --name Github

# Remove a profile
gcm remove Github

# Apply the profile in the current repo
gcm apply github

# List all profiles
gcm list

The apply (and auto) commands run git config <key> <value> for each entry in the profile in the current working directory. The current directory must be inside a git repository.

The auto command inspects the repository's remotes (e.g. github.com, gitlab.com), looks for a saved configuration whose name matches the hostname (case-insensitive), and applies it. If multiple configurations match, you are prompted to choose.

Configurations are stored at ~/.config/gcm/configs.json.