Cherry-pick without dragging half the branch

Back to list2023-10-28
You

I need one commit from a long branch, not the rest.

ChatGPT

git cherry-pick <sha> is the direct answer, but check whether the commit depends on earlier ones first. If it does, the conflict you get is real information: the change was never independent, and copying it alone will compile but misbehave.