From samocode
Merges a source branch into the current working branch with preflight checks, conflict handling, optional session documentation, and targeted validation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/samocode:mergeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Merge a source branch into the current branch. Default source is `origin/main`.
Merge a source branch into the current branch. Default source is origin/main.
Resolve the repository before running git commands:
Working Dir: from its _overview.md.CLAUDE.md or .samocode defines MAIN_REPO, use that.git rev-parse --show-toplevel from the current directory.Do not run the merge from main, master, or another protected default branch unless the user explicitly asked for that.
date '+%m-%d-%H:%M' for session filenames.date '+%H:%M' for flow-log entries.git branch --show-currentgit status --porcelaingit fetch origingit merge [source-branch] --no-ff --no-commitgit status --short and the merged file list.git commit -m "Merge [source-branch] into [current-branch]".git diff --name-only --diff-filter=U.[SESSION_PATH]/[MM-DD-HH:mm]-merge-[branch].md._overview.md Flow Log and Files.Finish with:
Merge complete
[X] files changed
Conflicts: [Y resolved / none]
Checks: [commands and results]
npx claudepluginhub yuvasee/samocodePre-merge analysis: commit stats, conflict detection, file impact. Outputs report + suggested commands. Analysis-only, does not auto-merge.
Updates Git branch by fetching and merging upstream changes, with intelligent conflict resolution using context from commits and files. Use for syncing branches, pulling latest from main, or resolving PR conflicts.
Merges current branch into a target branch, pushes if remote exists, then returns to original branch. Useful for syncing work branches without staying on target.