merge
Featuredブランチをメインにマージしてお掃除する
Code & Development 1,045 stars
100 forks Updated today MIT
Install
Quality Score: 92/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# ブランチマージ & クリーンアップ
作業ブランチを main にマージし、不要になったブランチと worktree を削除する。
## 前提条件
- 作業ブランチで全ての変更がコミット済みであること
- 現在のブランチが main **でない**こと
## 手順
### 1. 事前確認
```bash
git branch --show-current
```
- 現在のブランチ名を記録する(= `<branch>` とする)
- `main` の場合はマージ対象がないため中断する
```bash
git status --short
```
- 未コミットの変更がある場合は中断し、先にコミットするよう促す
### 2. main に切り替え
```bash
git checkout main
```
### 3. マージ (--no-ff)
```bash
git merge --no-ff <branch>
```
- マージコンフリクトが発生した場合は中断してユーザーに報告する
### 4. 作業ブランチの削除
```bash
git branch -d <branch>
```
### 5. worktree のクリーンアップ
```bash
git worktree list
```
- `<branch>` に紐づく worktree がある場合のみ以下を実行:
```bash
git worktree remove <worktree-path>
```
- worktree ディレクトリが残っている場合は手動削除が必要な旨を通知する
### 6. 完了報告
最終状態を表示する:
```bash
git log --oneline -5
git branch
git worktree list
```
Details
- Author
- K9i-0
- Repository
- K9i-0/ccpocket
- Created
- 6 months ago
- Last Updated
- today
- Language
- Dart
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
git-cleanup
GitHub PR マージ後のローカル Git リポジトリをクリーンアップ。マージ済みブランチの削除、リモート同期、main ブランチへの切り替えを実行。「/git-cleanup」「マージ後の掃除」「ブランチ整���」で使用。
0 Updated 1 weeks ago
tanuuuuuuu Code & Development Listed
git-worktrees
並列開発の git worktree を作成・同期・整理し、衝突を避ける。別セッションや複数タスクを同時進行する時に使う。通常の単一ブランチ作業には使わない。「worktreeを切って」「別セッションと並列で進める」を正のトリガーとし、単一branch内の通常作業や単なるbranch削除には使わない。
0 Updated yesterday
MasashiFukuzawa Code & Development Listed
merged
Delete merged branches and worktrees after listing them for approval, then update main. Use when a PR was merged(マージ後の後片付け・ブランチを整理・worktreeを削除).
1 Updated 2 days ago
devbasex