git-merge-origin-main
Installation
SKILL.md
Git Merge Origin Main
Safely bring the latest origin/main into the current non-main branch without disturbing unrelated work.
Preconditions
Before fetching or merging:
- Confirm the current directory is a Git worktree.
- Confirm the current branch is neither
mainnor detached HEAD. - Stop if a merge, rebase, cherry-pick, or revert is already in progress.
- Run
git status --short, which includes staged, unstaged, and untracked changes. - If it prints anything, stop and show the status. Do not fetch or merge. Ask the user to make the tree clean or explicitly request a separate handling strategy.
Never stash, commit, reset, clean, restore, or discard changes automatically.