git-cherry-pick

How to copy commits from one branch to another?

I am using the following workflow with git: I set a task I create a branch for it from master implement task pull i ... ver, I skipped step number (2) and committed all my code in the master. How can I change my master commits to another branch?