git-workflow
ファイル修正前にブランチを確認・作成する。コードを編集する前、ファイルを変更する前、バグ修正や機能追加を行う前に使用。mainブランチへの直接コミットを防ぐ。
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Git ワークフロー
ファイルを修正する前に、必ず適切なブランチにいることを確認する。
修正前の必須チェック
ファイルを編集する前に必ず実行:
# 1. 現在のブランチを確認
git branch --show-current
# 2. mainまたはmasterにいる場合は、新しいブランチを作成
git checkout -b <type>/<description>
ブランチ命名規則
<type>/<description>
| Type | 用途 | 例 |
|---|---|---|
feat |
新機能 | feat/add-chart-zoom |
fix |
バグ修正 | fix/calculation-error |
refactor |
リファクタリング | refactor/split-components |
docs |
ドキュメント | docs/update-readme |
chore |
雑務・設定 | chore/update-deps |
test |
テスト追加 | test/add-unit-tests |
チェックリスト
- ✅
main/masterにいないか確認 - ✅ 適切なブランチ名を付けたか
- ✅
git pullで最新を取得したか
コミット&プッシュ
# ステージング
git add <files>
# コミット(Conventional Commits形式)
git commit -m "<type>(<scope>): <description>"
# プッシュ(新規ブランチ)
git push -u origin <branch-name>
# プッシュ(既存ブランチ)
git push
Conventional Commits
-
feat(frontend): 資産チャートにズーム機能を追加 -
fix(backend): 支出計算の丸め誤差を修正 -
docs: READMEを更新 -
chore: 依存関係を更新
禁止事項
❌ main ブランチに直接コミットしない
❌ ブランチを切らずにファイルを編集しない
❌ 意味のないブランチ名を付けない(fix/fix, test/test)
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!