# Instead of:
git commit
# Use:
gitwizThe wizard prompts you for a commit subject line:
- Must be non-empty
- Recommended: 50 characters or less
- Maximum: 72 characters
- Should be imperative mood ("Add feature" not "Added feature")
Example:
✓ "Fix user authentication bug"
✓ "Add dark mode support"
✗ "fixed stuff" (too vague)
✗ "This commit adds a new feature that allows users to..." (too long)
Detailed explanation of your changes:
- Press ESC when done editing
- Can be multi-line
- Explain the "why", not just the "what"
Example:
The previous authentication flow had a race condition
when multiple requests arrived simultaneously. This fix
adds mutex locking around the session store.
GitWizard automatically scrapes contributors from the last 3 months:
- Excludes your own email
- Multi-select with space bar
- Press Enter when done
Result in commit:
Co-authored-by: Jane Doe <jane@example.com>
Co-authored-by: John Smith <john@example.com>
Link related issues or PRs:
- Comma-separated
- Supports:
#123,PROJ-456, URLs
Examples:
#123
#123, #456
https://github.com/user/repo/issues/123
JIRA-456, #789
Result in commit:
Refs: #123
Refs: PROJ-456
Automatically close issues:
- Comma-separated
- Automatically adds
#prefix to plain numbers
Input: 123, 456
Result in commit:
Fixes: #123
Fixes: #456
If your branch name contains an issue reference, GitWizard will automatically suggest it:
# Branch: feature/PROJ-123-add-login
# GitWizard detects: PROJ-123If your clipboard contains a URL or issue reference, GitWizard will suggest it as a reference.
GitWizard respects your git configuration:
- If you have GPG signing enabled, the passphrase prompt will appear
- No special configuration needed
If you haven't staged any files:
[!] No changes staged for commit.
Would you like to stage all changes and commit? [y/N]
If a merge or rebase is in progress:
[!] A merge or rebase is in progress.
Continue with commit? [y/N]
GitWizard works even in brand new repositories:
- Co-author list will be empty (no history to scrape)
- All other features work normally
[X] Error: not a git repository (or any parent directory)
# 1. Make your changes
echo "console.log('hello');" > app.js
# 2. Stage files
git add app.js
# 3. Run GitWizard
gitwiz
# 4. Fill out the form:
# Subject: Add hello world logging
# Body: Initial implementation of logging system
# Co-Authors: (select Jane Doe)
# References: #123
# Fixes: #456
# 5. Preview and confirm
[-] Commit Message Preview:
─────────────────────────
Add hello world logging
Initial implementation of logging system
Co-authored-by: Jane Doe <jane@example.com>
Refs: #123
Fixes: #456
─────────────────────────
Proceed with commit? [Y/n]
# 6. Success!
[OK] Commit successful! [*]Create ~/.gitwiz.yaml to customize behavior:
custom_trailers:
Reviewed-by: "Senior Dev <senior@example.com>"
Ticket: "PROJ-123"
default_co_authors:
- "Frequent Collaborator <collab@example.com>"
issue_patterns:
- "PROJ-\\d+"
- "TICKET-\\d+"# Ensure GitWizard is in your PATH
which gitwiz
# If not found, reinstall:
cd /path/to/gitwiz
./install.sh- Ensure your terminal supports TTY input
- Check
git config --global gpg.program
- Linux: Requires X11 or Wayland
- macOS: Works out of the box
- SSH/Remote: Clipboard features may not work
- Requires UTF-8 terminal
- Minimum terminal size: 80x24
- Use a modern terminal emulator
-
Quick commits: For simple commits, just fill the subject and hit Enter through the rest
-
Template commits: Always use the same co-authors? Set them in config (future feature)
-
Conventional Commits: Add prefixes like
feat:,fix:,docs:to your subjects -
Link everything: Always link to issues for better traceability
-
Use the body: Future you (and your team) will thank you for explanations
- GitWizard never executes user input as shell commands
- All git operations use safe
exec.Command()calls - Input is sanitized and validated before use
See SECURITY.md for detailed security information.