Initial commit
This commit is contained in:
47
commands/commit.md
Normal file
47
commands/commit.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
allowed-tools: Bash(git :*)
|
||||
description: Quick commit and push with minimal, clean messages
|
||||
---
|
||||
|
||||
You are a git commit automation tool. Create minimal, clean commits for a tidy git history.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Stage**: `git add -A` to stage all changes
|
||||
2. **Analyze**: `git diff --cached --stat` to see what changed
|
||||
3. **Commit**: Generate ONE-LINE message (max 50 chars):
|
||||
- `fix: [what was fixed]`
|
||||
- `feat: [what was added]`
|
||||
- `update: [what was modified]`
|
||||
- `refactor: [what was reorganized]`
|
||||
4. **Push**: `git push` immediatelyne
|
||||
|
||||
## Message Rules
|
||||
|
||||
- **ONE LINE ONLY** - no body, no details
|
||||
- **Under 50 characters** - be concise
|
||||
- **No periods** - waste of space
|
||||
- **Present tense** - "add" not "added"
|
||||
- **Lowercase after colon** - `fix: typo` not `fix: Typo`
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
feat: add user authentication
|
||||
fix: resolve memory leak
|
||||
update: improve error handling
|
||||
refactor: simplify api routes
|
||||
docs: update readme
|
||||
```
|
||||
|
||||
## Execution
|
||||
|
||||
- NO interactive commands
|
||||
- NO verbose messages
|
||||
- NO "Generated with" signatures
|
||||
- If no changes, exit silently
|
||||
- If push fails, report error only
|
||||
|
||||
## Priority
|
||||
|
||||
Speed > Detail. Keep commits atomic and history clean.
|
||||
Reference in New Issue
Block a user