git-sw

Switch Git user profiles by managing gitconfig include entries and identity fields.

1|Updated Jul 8, 2024
One-click install
npx skills add https://github.com/thansetan/git-sw --skill git-sw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-sw
Source: https://github.com/thansetan/git-sw/tree/main
Command: npx skills add https://github.com/thansetan/git-sw --skill git-sw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing multiple Git identities (name, email, and optional signing keys) is annoying when you switch between work, personal, and project-specific setups—especially when you need consistent .gitconfig behavior across repositories.

Core Features & Use Cases

  • Switch profiles (use): Apply a selected profile’s configuration to Git by updating include.path entries.
  • Create/edit/delete profiles: Manage stored profiles that map identity settings into saved .gitconfig fragments.
  • TUI for humans + non-interactive mode for agents: Use an interactive prompt experience for manual workflows, or rely on flag-based execution in --no-tui mode for automation and CI.

Quick Start

Use the command git-sw --no-tui --profile work --name "User Name" --email "[email protected]" create to create a new Git profile named work without any interactive prompts.

Frequently Asked Questions about git-sw

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch between multiple Git user profiles for different projects?

Switch Git profiles by selecting a stored identity that updates per-profile gitconfig include entries, applying name, email, and optional signing keys to your local repository or global configuration.

Can I automate Git profile switching in CI pipelines without interactive prompts?

Automate Git profile switching in CI using non-interactive --no-tui flags that enforce required parameters like profile name and email, bypassing the interactive TUI for automated agent workflows.

What is the best way to manage separate Git identities for work and personal repositories?

Manage separate Git identities by creating stored profiles that map identity settings into saved gitconfig fragments, then applying specific profiles to switch between work and personal setups.

How do I configure GPG signing keys when switching Git profiles?

Configure GPG signing keys during Git profile creation by providing an optional signing key parameter, which enforces format validation and applies the key to your gitconfig identity fields.

Does Git profile switching work with both global gitconfig and local repository configurations?

Git profile switching works with both local repository use and global ~/.gitconfig updates by managing per-profile gitconfig include entries that apply identity settings across your selected scope.

How do I create a new Git profile from the command line without using the TUI?

Create a new Git profile without the TUI by running git-sw with --no-tui mode, passing required parameters like --profile, --name, and --email to store the identity configuration non-interactively.