git-merge
Skill3 starsChanged 11 months agoMITView on GitHub
Safely merge current branch into target branch and return. Use when user wants to merge current branch to another branch, mentions "merge A to B", "merge my branch into", or similar merge requests. Ensures current changes are committed before merging, switches to target branch, performs merge, then switches back.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- MithunWijayasiri/dotclaudetheir own version, first seen Oct 4, 2026
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- mantaray0/crewtheir own version, first seen Jun 12, 2026
- Cogni-AI-OU/cogni-ai-agent-skillstheir own version, first seen May 19, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- aws-solutions/konductor★ 9same name
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- MithunWijayasiri/dotclaude★ 4same name
- mantaray0/crew★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cron-architectureSkill
- terminal-imageSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
ALWAYS use the script: - do NOT use manual git commands:
- Distinctive: line 42
Always returns to original branch (even if push fails)
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Merge Workflow
Safely merge the current branch into a target branch and return to the original branch.
When to Use
Automatically activate when the user:
- Explicitly asks to merge branches ("merge A to B", "merge my branch into")
- Mentions combining changes from current branch to another ("merge into main", "merge to develop")
- Asks to "push my changes to [branch]" but means merging
- Says phrases like "merge this feature to main" or "combine my branch with develop"
Workflow
ALWAYS use the script - do NOT use manual git commands:
bash skills/git-merge/scripts/safe_merge.sh [--push] <target-branch>Options:
--push合并后自动推送到远程分支
Examples:
bash skills/git-merge/scripts/safe_merge.sh main
bash skills/git-merge/scripts/safe_merge.sh develop
bash skills/git-merge/scripts/safe_merge.sh --push mainSafety Guarantees
- Checks for uncommitted changes and warns user
- Stashes uncommitted changes if requested
- Verifies target branch exists
- Performs merge with clear output
- Always returns to original branch (even if push fails)
- Reports merge status clearly
- Optional
--pushflag for automated remote push
Script Details
The script handles:
- Detecting current branch
- Checking for uncommitted changes
- Stashing changes if needed
- Switching to target branch
- Merging current branch into target
- Returning to original branch
- Restoring stashed changes if applicable
- Clear status reporting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

