merged

Switches to main, pulls latest changes, and deletes merged Git branches after PR merge.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/heman1033p-create/cv-v2-kongphop --skill merged-heman1033p-create
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merged
Source: https://github.com/heman1033p-create/cv-v2-kongphop/tree/main/.gemini/skills/merged
Command: npx skills add https://github.com/heman1033p-create/cv-v2-kongphop --skill merged-heman1033p-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After a pull request is merged on GitHub, developers often forget to clean up their local environment, leaving stale feature branches cluttering the repository and outdated local main branches. This Skill automates the post-merge cleanup routine so you return to a fresh main branch with one command. ## Core Features & Use Cases - Branch Detection: Captures the current branch name and stops safely if you are already on main or master. - Main Synchronization: Checks out main and pulls the latest commits from the remote origin. - Safe Branch Deletion: Removes the merged local branch with git branch -d (refusing unmerged branches) and deletes the remote branch if it still exists. - Use Case: You just merged PR #42 on GitHub. Run the skill to switch back to main, pull the merge commit, and delete the feature branch both locally and remotely in one step. ## Quick Start Ask the AI to run the merged cleanup skill to switch to main, pull the latest changes, and delete the branch whose pull request was just merged.

Frequently Asked Questions about merged

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

FAQPage Schema
How do I clean up Git branches after merging a pull request?▼

After merging a PR, switch to main with git checkout main, pull the latest changes, then delete the feature branch with git branch -d and remove the remote copy with git push origin --delete. This skill automates all of these steps in sequence.

How to delete a local and remote Git branch safely?▼

Use git branch -d for local deletion, which refuses to delete branches with unmerged changes, preventing accidental work loss. For the remote, run git push origin --delete branch-name, optionally suppressing errors if the remote branch was already removed.

What happens if I run post-merge cleanup while already on main?▼

The skill detects when the current branch is main or master and stops immediately without making changes. There is nothing to clean up in that state, so no branches are deleted and no checkout occurs.

Why does git branch -d refuse to delete my branch?▼

git branch -d only deletes branches whose commits are fully merged into the current branch. If it refuses, the branch contains unmerged work; either merge it first or use git branch -D to force deletion at the risk of losing commits.

Does this cleanup work if the remote branch was already deleted on GitHub?▼

Yes. The remote deletion command uses error suppression with a fallback message, so if GitHub already deleted the branch during the merge, the skill reports that the remote branch is gone and continues without failing.