Skip to content

Add gitswitch to Tools#138

Open
OfirHaim1 wants to merge 1 commit into
dictcp:masterfrom
OfirHaim1:add-gitswitch
Open

Add gitswitch to Tools#138
OfirHaim1 wants to merge 1 commit into
dictcp:masterfrom
OfirHaim1:add-gitswitch

Conversation

@OfirHaim1
Copy link
Copy Markdown

Adding gitswitch under ## Tools.

* [gitswitch](https://github.com/target-ops/gitswitch) - per-directory git identity binding with a pre-commit hook that refuses wrong-author commits

What it does

Binds a git identity to a directory: writes an includeIf block to ~/.gitconfig so every cd into the bound directory automatically swaps user.email, user.name, the SSH key, and the gh CLI account. Plus a pre-commit hook (gitswitch guard) that refuses commits when the active email doesn't match the directory's bound identity — makes "I committed as the wrong person" structurally impossible.

Single Go binary, MIT licensed, ~2 MB, no runtime dependencies. macOS arm64/x64, Linux x64/arm64, Windows. Brew install via target-ops/homebrew-tap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant