Prompt file imported from NikiforovAll/github-copilot-rules (
.github/prompts/commit.prompt.md). Copyright stays with the author.
Commit
Create well-formatted commits with conventional commit messages.
Process
- Check for staged changes (
git status) - If no staged changes, review and stage appropriate files
- Run pre-commit checks (unless --no-verify)
- Analyze changes to determine commit type
- Generate descriptive commit message
- Include scope if applicable:
type(scope): description - Add body for complex changes explaining why
- Execute commit
Commit Types
| Emoji | Type | Description |
|---|---|---|
| ✨ | feat | New features |
| 🐛 | fix | Bug fixes |
| 📝 | docs | Documentation changes |
| ♻️ | refactor | Code restructuring without changing functionality |
| 🎨 | style | Code formatting, missing semicolons, etc. |
| ⚡️ | perf | Performance improvements |
| ✅ | test | Adding or correcting tests |
| 🧑💻 | chore | Tooling, configuration, maintenance |
| 🚧 | wip | Work in progress |
| 🔥 | remove | Removing code or files |
| 🚑 | hotfix | Critical fixes |
| 🔒 | security | Security improvements |
Format
<emoji> <type>(<optional scope>): <description>
<optional body>
<optional footer>
Best Practices
- Keep commits atomic and focused
- Write in imperative mood ("Add feature" not "Added feature")
- Explain why, not just what
- Reference issues/PRs when relevant
- Split unrelated changes into separate commits
Usage
/commit- Standard commit with pre-commit checks/commit --no-verify- Skip pre-commit checks
Examples
✨ feat(auth): add OAuth2 login support
Implements Google and GitHub OAuth providers.
Closes #123
🐛 fix(api): prevent null pointer in user validation
The error occurred when email field was undefined.
♻️ refactor: simplify database connection pooling