Ready-to-use plugins for the git wrapper.
Note: Plugins are sourced (not executed) by the wrapper, so they run in the same shell environment and have access to wrapper variables and functions. The shebang line is for editor syntax highlighting only.
Copy plugins to your ~/.git.d/ directory:
cp pre-process.d/commit_bashsyntaxcheck.sh ~/.git.d/pre-process.d/
cp post-process.d/commit_todo_check.sh ~/.git.d/post-process.d/All plugins support enabled (default: true). Plugin-specific options use the format:
git config wrapper.plugin.<plugin_name>.<option> <value>Or in .gitconfig:
[wrapper "plugin.commit_pyblack"]
enabled = true
mode = errorValidate bash syntax with bash -n before commit. Checks .sh files and files with bash shebangs.
Run black on staged Python files.
| Option | Type | Default | Description |
|---|---|---|---|
mode |
string | warn |
warn to show issues, error to block commit |
Set commit author and GPG options when run inside Claude Code (when CLAUDECODE env var is set).
Warn or block --no-verify usage. Logs all bypass attempts to ~/.cache/git-wrapper/noverify.log.
| Option | Type | Default | Description |
|---|---|---|---|
mode |
string | warn |
warn to show warning, strict to block commit |
Check staged files for trailing whitespace and block commit if found. Provides sed commands to fix.
Detects text files via MIME type (text/*, application/json, application/x-python, etc.).
Organize cloned repos into basedir/host/user/repo structure.
| Option | Type | Default | Description |
|---|---|---|---|
basedir |
string | ~/git |
Base directory for organized repos |
force |
bool | false |
Organize even when called from scripts |
Warn about TODOs in committed code.
| Option | Type | Default | Description |
|---|---|---|---|
regex |
string | (^|[^[:alnum:]_])TODO: |
Pattern to match TODO comments |
Check for WIP markers in committed code.
| Option | Type | Default | Description |
|---|---|---|---|
regex |
string | (#|//|\*).*(^|[^[:alnum:]_])WIP([^[:alnum:]_]|$) |
Pattern to match WIP comments |
Show count of ignored files after git status. Only runs in interactive sessions.
Print a blessing after force pushes (--force, -f, --force-with-lease, --force-if-includes). And also with you.
Plugins should use the wrapper's color variables for any colored output. These are automatically configured based on color.ui and terminal detection—set when colors are appropriate, unset when output is piped or colors are disabled.
Since sourced plugins cannot detect whether the wrapper's output is being piped, using these variables ensures your plugin's colors follow git's color behavior automatically.
| Variable | Description |
|---|---|
C_RED, C_GREEN, C_YELLOW, etc. |
Foreground colors |
S_BOLD, S_DIM, S_RESET |
Style modifiers |
# Variables are empty when colors disabled, so this is safe
echo "${C_RED}Error:${S_RESET} something went wrong"For standardized warning/error messages, use these helper functions. They match git's output format and write to stderr:
| Function | Output |
|---|---|
warn "msg" |
warning: msg |
error "msg" |
error: msg |
fatal "msg" |
fatal: msg |
# Instead of custom error formatting
warn "file not found, skipping check"
error "invalid configuration value"
fatal "cannot continue without required dependency"Note: These output plain text (no colors) to match git's native message style. Use color variables if you need more prominent formatting for user-facing notices.


