| name | commit |
| description | Create Git commits by splitting changes into logical units following project conventions. Handles Git Flow automatically โ detects develop branch and checks out a feature branch before committing. |
| allowed-tools | Bash |
Step 0 โ Branch Check (Required)
Check the current branch first:
git branch --show-current
If current branch is develop:
This project uses Git Flow. Feature branches must be created from develop and merged back into develop.
- Analyze all changes with
git status and git diff
- Infer an appropriate branch name from the changes:
- Format:
<type>/<kebab-case-description> โ use the same type as the planned commit
- Reflect the domain scope in the name
- Examples:
add/add-team-list-api, fix/auth-login-bug, update/optimize-seat-query
- Create and checkout the branch:
git checkout -b <type>/<inferred-name>
- Proceed with the commit flow below
If current branch is NOT develop: proceed directly to the commit flow.
Commit Message Rules
Format: type :: description
- Git Commit Message Keyword
| Type | Meaning |
|---|
add | ์๋ก์ด ์ฝ๋๋ ํ์ผ์ ์ถ๊ฐํ์์ ๋ |
update | ๊ธฐ์กด์ ์ฝ๋๋ฅผ ์์ ํ์ ๋ |
fix | ๋ฒ๊ทธ๋ฅผ ์์ ํ์ ๋ |
delete | ์ญ์ ํ ์ฌํญ์ด ์์ ๋ |
docs | ๋ฌธ์๋ฅผ ์์ |
test | ํ
์คํธ ๊ด๋ จ ์ฌํญ์ ์ถ๊ฐ/์์ ํ์์ ๋ |
merge | ๋ธ๋์น๋ฅผ ๋ณํฉํ์์ ๋ |
init | ํ๋ก์ ํธ ์ด๊ธฐํ ์ |
- Message examples:
add :: ๊ฑฐ๋ ์ํ ๋ณ๊ฒฝ ์๋ฆผ ์ ์ก ์ถ๊ฐ
update :: ๊ฑฐ๋ ์ํ ์ด๋ฒคํธ ์์ ๋์ ๋ถ๋ฆฌ
fix :: ๋ด๋ถ API ํค๋ ๊ฒ์ฆ ์ค๋ฅ ์์
- Description: Korean, no period, use noun-ending style; forbidden endings:
~ํ๋ค/~๋๋ค, ~ํ๊ธฐ, ~ํฉ๋๋ค/~๋ฉ๋๋ค, ~ํ์ต๋๋ค
- Good:
์ํฐํฐ ํ๋ ์ถ๊ฐ, ํธ๋์ญ์
๋กค๋ฐฑ ๋ฐฉ์ง, ๋ก์ง ๊ฐ์
- Subject line only (no body)
- Do NOT add AI as co-author
Commit Flow
- Inspect changes:
git status, git diff
- Group changed files by logical unit of change:
- Same feature or bug fix โ one commit
- Related files that must change together (e.g. entity + service + controller for one feature) โ one commit
- Unrelated changes โ separate commits
- For each logical group:
- Stage the relevant files:
git add <file1> <file2> ...
- Write a commit message that describes the change as a whole
git commit -m "message"
- Verify with
git log --oneline -n <count>
Rule: One logical change = One commit. Files that must change together belong in the same commit. Unrelated changes must be split.