jpskill.com
🛠️ 開発・MCP コミュニティ

managing-git

Manages Git workflows including branching, commits, and pull requests. Use when working with Git, creating commits, opening PRs, managing branches, resolving conflicts, or when asked about version control best practices.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o managing-git.zip https://jpskill.com/download/17945.zip && unzip -o managing-git.zip && rm managing-git.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17945.zip -OutFile "$d\managing-git.zip"; Expand-Archive "$d\managing-git.zip" -DestinationPath $d -Force; ri "$d\managing-git.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して managing-git.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → managing-git フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Git の管理

機能開発ワークフロー

このチェックリストをコピーして、進捗状況を追跡してください。

機能開発の進捗状況:
- [ ] ステップ 1: main からフィーチャーブランチを作成する
- [ ] ステップ 2: アトミックコミットで変更を加える
- [ ] ステップ 3: 最新の main にリベースする
- [ ] ステップ 4: プッシュして PR を作成する
- [ ] ステップ 5: レビューのフィードバックに対応する
- [ ] ステップ 6: 承認後にマージする

ブランチ戦略

GitHub Flow (ほとんどのプロジェクトに推奨)

main ──●────●────●────●────●── (常にデプロイ可能)
        \          /
feature  └──●──●──┘
  • main は常にデプロイ可能
  • main からフィーチャーブランチを作成
  • PR + レビュー + マージ
  • マージ後にデプロイ

Git Flow (リリースベースのプロジェクト向け)

main     ──●─────────────●────── (リリースのみ)
            \           /
release      └────●────┘
                 /
develop  ──●──●────●──●──●──
            \     /
feature      └──●┘

コミット規約

Conventional Commits 形式

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

タイプ

Type Description
feat 新機能
fix バグ修正
docs ドキュメントのみ
style フォーマット、ロジックの変更なし
refactor バグ修正でも機能追加でもないコード変更
perf パフォーマンスの改善
test テストの追加/更新
chore ビルドプロセス、依存関係
ci CI の設定

feat(auth): add OAuth2 login support

Implements Google and GitHub OAuth providers.
Closes #123

BREAKING CHANGE: Session tokens now expire after 24h
fix(api): handle null response from payment gateway

Previously caused 500 error when gateway returned null.
Now returns appropriate error message to user.

ブランチ命名

<type>/<ticket-id>-<short-description>

# Examples
feature/AUTH-123-oauth-login
fix/BUG-456-null-pointer
chore/TECH-789-upgrade-deps

プルリクエストワークフロー

PR を作成する際に、このチェックリストをコピーしてください。

PR チェックリスト:
- [ ] コードはプロジェクトの規約に従っている
- [ ] 変更に対してテストが追加/更新されている
- [ ] すべてのテストがローカルでパスする
- [ ] main とのマージコンフリクトがない
- [ ] 必要に応じてドキュメントが更新されている
- [ ] セキュリティ上の脆弱性が導入されていない
- [ ] PR の説明で「なぜ」を説明している

PR テンプレート

## Summary
[変更の簡単な説明]

## Changes
- [変更 1]
- [変更 2]

## Testing
- [ ] ユニットテストが追加/更新された
- [ ] 手動テストが実行された
- [ ] E2E テストがパスした

## Screenshots (UI の変更の場合)
[変更前/変更後のスクリーンショット]

PR サイズのガイドライン

Size Lines Changed Review Guidance
XS < 50 簡単なレビュー
S 50-200 標準的なレビュー
M 200-500 徹底的なレビュー
L 500+ 可能であれば分割する

一般的な Git コマンド

毎日のワークフロー

# 新しい機能を開始
git checkout main
git pull
git checkout -b feature/TICKET-123-description

# 変更をコミット
git add -p  # 対話的にステージング
git commit -m "feat: description"

# main に追いつく
git fetch origin main
git rebase origin/main

# プッシュして PR を作成
git push -u origin HEAD

間違いの修正

# 最後のコミットを修正 (プッシュ前)
git commit --amend

# 最後のコミットを取り消す (変更は保持)
git reset --soft HEAD~1

# 最後のコミットを取り消す (変更を破棄)
git reset --hard HEAD~1

# プッシュされたコミットを元に戻す
git revert <commit-hash>

# 対話的なリベースでクリーンアップ
git rebase -i HEAD~3

高度な操作

# 特定のコミットをチェリーピック
git cherry-pick <commit-hash>

# 何が原因で壊れたのかを見つける
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>

# メッセージ付きでスタッシュ
git stash push -m "WIP: feature description"
git stash list
git stash pop

コミットの検証

プッシュする前に、コミットを検証してください。

コミットの検証:
- [ ] 各コミットには、明確で説明的なメッセージがある
- [ ] コミットタイプが変更と一致する (feat, fix など)
- [ ] WIP または一時的なコミットがない
- [ ] シークレットまたはクレデンシャルがコミットされていない
- [ ] 変更はアトミックである (1 つの論理的な変更につき 1 つのコミット)

検証に失敗した場合は、git rebase -i を使用して、プッシュする前にコミット履歴をクリーンアップしてください。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Managing Git

Feature Development Workflow

Copy this checklist and track progress:

Feature Development Progress:
- [ ] Step 1: Create feature branch from main
- [ ] Step 2: Make changes with atomic commits
- [ ] Step 3: Rebase on latest main
- [ ] Step 4: Push and create PR
- [ ] Step 5: Address review feedback
- [ ] Step 6: Merge after approval

Branching Strategies

GitHub Flow (Recommended for most projects)

main ──●────●────●────●────●── (always deployable)
        \          /
feature  └──●──●──┘
  • main is always deployable
  • Feature branches from main
  • PR + review + merge
  • Deploy after merge

Git Flow (For release-based projects)

main     ──●─────────────●────── (releases only)
            \           /
release      └────●────┘
                 /
develop  ──●──●────●──●──●──
            \     /
feature      └──●┘

Commit Conventions

Conventional Commits Format

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Types

Type Description
feat New feature
fix Bug fix
docs Documentation only
style Formatting, no logic change
refactor Code change that neither fixes bug nor adds feature
perf Performance improvement
test Adding/updating tests
chore Build process, dependencies
ci CI configuration

Examples

feat(auth): add OAuth2 login support

Implements Google and GitHub OAuth providers.
Closes #123

BREAKING CHANGE: Session tokens now expire after 24h
fix(api): handle null response from payment gateway

Previously caused 500 error when gateway returned null.
Now returns appropriate error message to user.

Branch Naming

<type>/<ticket-id>-<short-description>

# Examples
feature/AUTH-123-oauth-login
fix/BUG-456-null-pointer
chore/TECH-789-upgrade-deps

Pull Request Workflow

Copy this checklist when creating PRs:

PR Checklist:
- [ ] Code follows project conventions
- [ ] Tests added/updated for changes
- [ ] All tests pass locally
- [ ] No merge conflicts with main
- [ ] Documentation updated if needed
- [ ] No security vulnerabilities introduced
- [ ] PR description explains the "why"

PR Template

## Summary
[Brief description of changes]

## Changes
- [Change 1]
- [Change 2]

## Testing
- [ ] Unit tests added/updated
- [ ] Manual testing performed
- [ ] E2E tests pass

## Screenshots (if UI changes)
[Before/After screenshots]

PR Size Guidelines

Size Lines Changed Review Guidance
XS < 50 Quick review
S 50-200 Standard review
M 200-500 Thorough review
L 500+ Split if possible

Common Git Commands

Daily Workflow

# Start new feature
git checkout main
git pull
git checkout -b feature/TICKET-123-description

# Commit changes
git add -p  # Stage interactively
git commit -m "feat: description"

# Keep up with main
git fetch origin main
git rebase origin/main

# Push and create PR
git push -u origin HEAD

Fixing Mistakes

# Amend last commit (before push)
git commit --amend

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Undo last commit (discard changes)
git reset --hard HEAD~1

# Revert a pushed commit
git revert <commit-hash>

# Interactive rebase to clean up
git rebase -i HEAD~3

Advanced Operations

# Cherry-pick specific commit
git cherry-pick <commit-hash>

# Find which commit broke something
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>

# Stash with message
git stash push -m "WIP: feature description"
git stash list
git stash pop

Commit Validation

Before pushing, validate commits:

Commit Validation:
- [ ] Each commit has a clear, descriptive message
- [ ] Commit type matches the change (feat, fix, etc.)
- [ ] No WIP or temporary commits
- [ ] No secrets or credentials committed
- [ ] Changes are atomic (one logical change per commit)

If validation fails, use git rebase -i to clean up commit history before pushing.