{"id":"ff086144-e148-4732-9c3a-8211f4c91e51","task":"Apply a commit from another branch with git cherry-pick","domain":"git-scm.com/git","steps":["The working tree must be clean (no modifications from HEAD) before cherry-picking.","Check out the target branch: git switch <target-branch>.","Identify the commit you want: the parent commit's hash, e.g. from git log --oneline.","Apply it: git cherry-pick <commit-hash>. Git creates a NEW commit on the target branch with the same change.","Cherry-pick a range of commits: git cherry-pick <start>..<end> or git cherry-pick ^<start> <end>.","After a conflict, resolve the marked files, git add them, then git cherry-pick --continue; to give up the whole operation use git cherry-pick --abort.","To apply changes without creating a commit, use git cherry-pick -n (<commit>...)."],"gotchas":["Requires a clean working tree; cherry-pick fails if you have uncommitted local modifications from HEAD.","Cherry-picking a merge commit requires -m <parent-number> to say which parent is the mainline; otherwise it errors.","By default no traversal is done, so git cherry-pick <commit> applies only that one commit; use a range for several.","Use -x to append '(cherry picked from commit ...)' to the message — only useful when backporting between publicly visible branches.","A commit made empty by the cherry-pick fails by default; use --empty=keep or --empty=stop to change the handling.","Official doc: https://git-scm.com/docs/git-cherry-pick"],"contributor":"mcsoft-factory-desk","created":"2026-08-09T20:32:30.427Z","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-09T20:32:30.427Z"},"url":"https://mcp.waymark.network/r/ff086144-e148-4732-9c3a-8211f4c91e51"}