merged

Switch to main, pull updates, and delete a merged Git feature branch.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/thiansit/LuPang --skill merged-thiansit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merged
Source: https://github.com/thiansit/LuPang/tree/main/.claude/skills/merged
Command: npx skills add https://github.com/thiansit/LuPang --skill merged-thiansit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill removes leftover local and remote Git branches after a pull request merge by switching to the main branch, pulling the latest changes, and deleting the merged feature branch safely.

Core Features & Use Cases

  • Switches to the main branch and pulls the latest commits to synchronize local repository state.
  • Deletes the merged feature branch locally using a safe delete and attempts to remove the remote branch if present.
  • Safety checks prevent deletion when already on main or when the branch contains unmerged commits; ideal for finishing feature work after a PR is merged.

Quick Start

Run the merged skill after your pull request is merged to switch to main, pull latest changes, and delete the merged branch.

Frequently Asked Questions about merged

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up local and remote Git branches after a pull request is merged?▼

To clean up merged Git branches, you switch to the main branch, pull the latest changes, and safely delete the merged feature branch locally and remotely. This synchronizes your local repository state with the origin.

What is the safest way to delete a Git feature branch after merging?▼

The safest way to delete a merged Git feature branch is using a safe delete approach that checks for unmerged commits. This prevents removing branches with unmerged work, ensuring no local changes are lost during cleanup.

Can I automate switching to main and pulling updates after a PR merge?▼

Yes, you can automate switching to main and pulling updates after a PR merge. The process synchronizes your local repository by automatically checking out the main branch and pulling the latest commits from the remote origin.

What happens if I try to delete a Git branch with unmerged commits?▼

If you try to delete a Git branch with unmerged commits, safety checks prevent the deletion from occurring. This ensures that any feature branch containing work not merged into the main branch is preserved.

Do I need network access to origin to delete a remote Git branch?▼

Yes, you need network access to the origin remote to pull updates and delete the remote Git branch. The cleanup process requires communicating with the remote repository to synchronize and remove the merged branch.

Why does branch cleanup fail when I am already on the main branch?▼

Branch cleanup fails when already on the main branch because safety checks prevent the deletion operation from executing in an invalid state. You must be on the feature branch you intend to clean up before running the process.