git-commit
このプロジェクトにおけるGitコミットの手順とコミットメッセージの規約を理解し、適切にコミットできる。
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Git Commit
Workflow
1. Check Staged Changes
コミット可能かどうかを確認するため、まずステージされた変更を確認します。
git diff --cached --stat
もし変更がない場合は、ユーザーに git add した上で続行するかを確認します。
2. Analyze Diff
変更内容を詳細に確認します。
git diff --cached
3. Generate Commit Message
Conventional Commits に従ってコミットメッセージを生成します。
Format
<type>(<scope>): <subject>
[body]
Types
-
feat:- 新機能の追加 -
fix:- バグ修正 -
refactor:- リファクタリング -
docs:- ドキュメントの追加・更新 -
style:- フォーマット修正 (コードの動作に影響しない変更) -
perf:- パフォーマンス改善 -
test:- テストコードの追加・修正 -
chore:- メンテナンス作業-
chore(deps):- 依存関係の更新
-
Common Scopes: server, client, deps
Subject
変更内容を元に「どのような変更を行ったか」を簡潔に伝えます。
-
常に 現在形の命令形で始める (e.g.
add,implement,fix,improve,enhance,refactor,remove) - 常に タイトルは50文字以内
- 決して 大文字で始めない
- 決して ピリオドで終わらせない
-
決して 内容のないコミットメッセージにしない (e.g.
update,fix bugs)
4. Commit Changes
生成したコミットメッセージを使用して変更をコミットします。
# Simple
git commit -m "<type>(<scope>): <subject>"
# With Body
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
[body]
EOF
)"
Commit Message Examples
-
feat(chroma-cli): add new options for foobar -
fix(server): resolve validation issue in user input -
chore(deps): update Deno to X.Y.Z
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!