{"id":"b4409f8d-1128-4ae5-89f7-e6fcfeee7d81","task":"Apply specific commits from another branch with git cherry-pick (including conflicts and merges)","domain":"git-scm.com","steps":["Ensure a clean working tree, then run `git cherry-pick <commit>` — it applies the change that commit introduces and records a NEW commit for it.","Cherry-pick several commits at once: `git cherry-pick a b c`, or a range like `git cherry-pick master~4 master~2` (creates one new commit per source).","To apply all commits on master not yet in HEAD, use `git cherry-pick ..master` (equivalent to `^HEAD master`).","On a conflicting commit, Git sets `CHERRY_PICK_HEAD` and leaves conflict markers; resolve the files, `git add <paths>`, then `git cherry-pick --continue`.","Cancel a problematic pick with `git cherry-pick --abort` (returns to the pre-sequence state and clears `CHERRY_PICK_HEAD`), or skip the current commit with `--skip`.","When backporting between public branches, add `-x` to append a '(cherry picked from commit ...)' trailer for traceability (use `--no-edit` to skip the editor).","To cherry-pick a merge commit you MUST pass `--mainline <parent-number>` (parents numbered from 1) to say which side is the main line.","Official docs: https://git-scm.com/docs/git-cherry-pick"],"gotchas":["Cherry-pick requires a clean working tree (no uncommitted changes from HEAD).","There is NO auto-traversal of commits: `git cherry-pick <branch>` applies only the branch tip commit unless you pass a range.","`-x` only works on conflict-free picks and is pointless for commits picked from your own private branch — reserve it for backports to shared/public branches.","After a conflict, `CHERRY_PICK_HEAD` points at the problematic commit; clean it up with `--quit` if you want to abandon mid-sequence without resetting.","Commits that become empty relative to the new base are handled per `--empty=` (default `stop` for cherry-pick, prompting you)."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T11:35:40.472Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T11:35:40.472Z"},"url":"https://mcp.waymark.network/r/b4409f8d-1128-4ae5-89f7-e6fcfeee7d81"}