Skip to content

Latest commit

Β 

History

History
108 lines (81 loc) Β· 3.87 KB

File metadata and controls

108 lines (81 loc) Β· 3.87 KB

Git Commit Helper

πŸš€ A customizable Git commit wrapper that enforces structured commit messages using emojis, ticket references, and changelogs.


✨ Features

  • Supports multiple commit types (Feature, Bugfix, Documentation, etc.)
  • Adds emoji, changelog, and optional ticket references
  • Opens your preferred editor for rich commit messages
  • Supports -m inline message or editor-based commit templates
  • Falls back to standard git behavior for non-commit commands

πŸ“¦ Installation

go build -o git-wrapper main.go mv git-wrapper ~/bin/git-wrapper

make sure you set an alias git='~/bin/git-wrapper' in your ~/.zshrc or ~/.bashrc

πŸ”§ Usage Run it just like git, but use the commit subcommand for enhanced functionality:

git commit --type feat --ticket ABC-123 -m "add user registration"

Or use the editor for detailed commit messages:

git commit --type fix --ticket DEF-456 Optional Flags Flag Description --type Commit type (feat, fix, docs, etc.) --ticket Ticket ID(s), comma-separated -m, --message Commit message (if skipping editor)

🧠 Commit Message Template (Editor) When using the editor, a rich template is provided:

πŸš€ Feature: EDIT TITLE [ABC-123]

πŸ“ Description:
Explain what this commit does and why.

πŸ“¦ Changelog:

- added_file.go
  ~ modified_file.go

πŸ“ Affected files:

- added_file.go
  ~ modified_file.go

πŸ”— Related Ticket(s):

- ABC-123

If the title still contains EDIT TITLE, the commit will be aborted.

βœ… Supported Commit Types

Name Short Emoji Display Name
feature feat πŸš€ Feature
fix bug πŸ› Bugfix
chore chore πŸ”§ Chore
documentation docs πŸ“š Documentation
refactor refactor ♻️ Refactor
test test πŸ§ͺ Test
perf perf ⚑ Performance
ci ci πŸ“¦ CI/CD
config cfg πŸ”§ Configuration Change
network net 🌐 Network Change
misc misc πŸ“ Miscellaneous
first-commit first 🏁 First Commit
milestone mile πŸ† Milestone
release release 🎯 Release
style style 🎨 Style Change
revert revert βͺ Revert
merge merge πŸ”€ Merge
security sec πŸ”’ Security Fix
build build πŸ—οΈ Build System
deprecate depr πŸ—‘οΈ Deprecation
ux ux πŸ’‘ UX Improvement
ui ui πŸ–ΌοΈ UI Update
hotfix hotfix πŸš‘ Hotfix
lint lint 🧹 Linting
env env 🌱 Environment Setup
legal legal πŸ“„ Legal/Compliance
infra infra 🏭 Infrastructure Change
i18n intl 🌍 Internationalization
analytics analytics πŸ“Š Analytics/Tracking
rollback rollback ↩️ Rollback
prototype proto πŸ§ͺ Prototype/Experiment
log log πŸ“ Logging
monitoring mon πŸ“ˆ Monitoring
bump version πŸ”– Version Bump

πŸ›  Requirements Go 1.16+

Git installed and available in PATH

$EDITOR environment variable set (default: vim)