Git Commit Assistant
Overview
This skill ensures all git commits follow the structured format: <type>/#<issue-number>: <subject>. It helps identify the correct commit type, format the subject according to rules (50 chars, imperative, capitalized), and include the mandatory issue number.
Workflow
- •Analyze Changes: Run
git statusandgit diffto understand what has changed. - •Identify Type: Determine the appropriate type (feat, fix, refactor, etc.) based on convention.md.
- •Get Issue Number:
- •Check current branch name (e.g.,
feature/#123-login-> 123) following branch_convention.md. - •If not found, ask the user: "What is the issue number for this commit?"
- •Check current branch name (e.g.,
- •Draft Subject:
- •Summarize changes in Korean (or English if preferred by user) under 50 characters.
- •Start with a capital letter.
- •Use imperative mood (e.g., "구현", "수정", "추가").
- •Propose Command:
- •Show the full command:
git commit -m "<type>/#<issue-number>: <subject>" - •Wait for user confirmation before executing.
- •Show the full command:
Examples
- •New Feature:
feat/#42: 카카오 로그인 연동 구현 - •Bug Fix:
fix/#105: 로그아웃 시 토큰이 삭제되지 않는 버그 수정 - •Refactor:
refactor/#88: MyPageViewModel 로직 분리 및 최적화
Reference
- •Commit Convention: Full list of types and formatting rules.
- •Branch Naming Convention: Rules for branch names and issue number extraction.