Git merge into branch
Skill MarcoAntolini/cursor-sync/cursor-skills/git-merge-into-branch
Just a repo to sync my cursor skills, rules and commands.
npx -y skills add MarcoAntolini/cursor-sync --skill git-merge-into-branchAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Merges the branch you started on into a named target, pushes the target, then switches back.
SKILL.md
1.7 KB, 382 tokens by cl100k_base, as published. Nobody here has run it
Git merge into target branch
Land means: target receives a merge of the branch you started on (source), then you return to source.
target = branch name from this message (trimmed). If missing or ambiguous, ask once and stop.
Steps
source =git branch --show-current. Ifsourceequalstarget, report and stop.git status --short. Uncommitted changes → stop; do not stash/discard unless told in this message.git fetch --allwhen network is allowed (else use existing refs and say so).- Resolve
target:- Local exists → use it
- Else
origin/targetexists →git switch -c target --track origin/target(orgit switch targetif Git creates the tracking branch) - Else → report missing; stop (do not invent branches)
git switch targetthengit merge source(repo defaults for ff/merge).- Conflicts → list files, stay on
target, stop for manual resolve/abort. - After a clean merge: push
target(git push, orgit push -u origin <target>if no upstream). Push failure or no remote → stay ontarget, report; switch back only after push succeeds or the user says to skip push and switch back. - After push succeeds:
git switch source. - Done when:
targetcontains the merge, push succeeded (or skip authorized), and HEAD is back onsource— or you stopped at a hard stop above.
Guardrails
- Do not push
sourceor other branches unless this message asks. - No rebase,
--force, orreset --hardunless explicitly requested.