description: Using git to commit current changes match:
- commit
- git commit
Using git to commit current changes with the Commit Rule following these steps, and as fast as possible without any explanations.
Steps
- According to the staged changes existing or not,
- If there are staged changes, read the staged changes using
git --no-pager diff --cached - If there are not staged changes, read the changes in the current branch using
git --no-pager diff
- If there are staged changes, read the staged changes using
- According to the changes content, the changes may be committed with one or more commits.
- For each commit, generate a commit message using the Commit Rule.
- Commit the changes with the generated commit message.
Commit Rule
Follow the commit message format: <gitmoji> <scope?> <message>
Format Structure
- gitmoji: A required gitmoji indicating the type of change
- scope: Optional module/area name (e.g.,
gfx:,asset:,render_graph:) - message: Descriptive commit message in present tense
Gitmoji Reference
| Gitmoji | Code | Description |
|---|---|---|
| ✨ | :sparkles: | New feature |
| 🐛 | :bug: | Bug fix |
| ♻️ | :recycle: | Refactor / restructure code |
| ⚡ | :zap: | Performance improvement |
| ⬆️ | :arrow_up: | Upgrade dependencies |
| 💚 | :green_heart: | Fix CI/build |
| ✏️ | :pencil2: | Fix typo |
| 🔧 | :wrench: | Configuration changes |
| 📝 | :memo: | Documentation |
| 🎨 | :art: | Improve structure / format of code |
| 🔥 | :fire: | Remove code or files |
| 🏗️ | :building_construction: | Architectural changes |
Examples
✨ simple material viewer🐛 fix uninitialized RT/DS on D3D12MA heaps with CREATE_NOT_ZEROED♻️ modernize gfx: Vulkan submit2, std::ranges, scoped_lock; fix DX12 barriers⬆️ update sdl2 to sdl3♻️ refactor ecs interface⚡ use GPU Upload Heap (DX12) and VK_EXT_host_image_copy (Vulkan) for resource init
Rules
- Always start with an appropriate gitmoji
- Optionally include a scope prefix (e.g.,
gfx:,asset:) when the change affects a specific module - Keep the message concise but descriptive
- Use present tense ("Add feature" not "Added feature")
- Lowercase the message (except proper nouns like API names, DX12, Vulkan, etc.)