🧹
DevOpsDart

Branch Merge Cleanup

by K9i-0

Branch Merge Cleanup is a DevOps skill for Claude Code, published by K9i-0 in ccpocket.

1K stars97 forkson K9i-0/ccpocketAdded 2026/08/21Repository updated 2026/08/20
androidapp-serverbridge-serverclaude-codeclicodexflutteriosmobileopenairemote-controltypescriptwebsocket
Install in seconds
Install Branch Merge Cleanup
Copy Branch Merge Cleanup into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/K9i-0/ccpocket/tree/main/.claude/skills/merge ~/.claude/skills/merge

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/K9i-0/ccpocket.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
.claude/skills/merge/SKILL.md in K9i-0/ccpocket
Installs to
~/.claude/skills/merge
Collection
One of 18 skills cataloged from this repository
Category
DevOps798 skills

What Branch Merge Cleanup does

Branch Merge Cleanup merges a finished branch into main, deletes the branch, and removes any related worktree. Use it after all changes are committed and you want to tidy up the local Git state.

Branch Merge Cleanup is cataloged under DevOps on DirSkills. Branch Merge Cleanup comes from a repository tagged android, app-server, bridge-server, claude-code and cli.

Documentation

README

ブランチマージ & クリーンアップ

作業ブランチを main にマージし、不要になったブランチと worktree を削除する。

前提条件

  • 作業ブランチで全ての変更がコミット済みであること
  • 現在のブランチが main でないこと

手順

1. 事前確認

git branch --show-current
  • 現在のブランチ名を記録する(= <branch> とする)
  • main の場合はマージ対象がないため中断する
git status --short
  • 未コミットの変更がある場合は中断し、先にコミットするよう促す

2. main に切り替え

git checkout main

3. マージ (--no-ff)

git merge --no-ff <branch>
  • マージコンフリクトが発生した場合は中断してユーザーに報告する

4. 作業ブランチの削除

git branch -d <branch>

5. worktree のクリーンアップ

git worktree list
  • <branch> に紐づく worktree がある場合のみ以下を実行:
git worktree remove <worktree-path>
  • worktree ディレクトリが残っている場合は手動削除が必要な旨を通知する

6. 完了報告

最終状態を表示する:

git log --oneline -5
git branch
git worktree list

Frequently asked about Branch Merge Cleanup

  • What else does K9i-0 publish alongside Branch Merge Cleanup?

    Branch Merge Cleanup is one of 18 skills that DirSkills catalogs from K9i-0/ccpocket, the repository it ships in. Its siblings there include App Release, Codex Guide and Flutter App Testing. Each one is a separate skill with its own page in this directory, installs the same way Branch Merge Cleanup does, and is maintained by K9i-0 in that same repository. The rest of the collection is listed on the K9i-0/ccpocket page.

  • How does Branch Merge Cleanup compare to other DevOps skills?

    Branch Merge Cleanup ranks #433 by stars among the 798 DevOps skills in this catalog. The most-starred ones next to it are Backend Patterns, API Connector Builder and Migration. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Branch Merge Cleanup against them. Open each page to compare what they document and how they install.

More from K9i-0/ccpocket

Branch Merge Cleanup is one of 18 skills cataloged on DirSkills from K9i-0/ccpocket.

See all 18 skills