By making commits that can be cherry-picked. If one commit adds five different things then you can't add just one of those five things with git cherry-pick.
Then instead of making a second copy and then pasting the code over and commiting it, it's just git cherry-pick and you're done.