Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 493 Bytes

git-cherry-pick-commit.md

File metadata and controls

18 lines (10 loc) · 493 Bytes

Cherry Pick a Commit

Copy a commit from one branch to another. Run the below command on the destination branch where you want your commit to be copied

git cherry pick -x {{COMMIT_SHA}}

  • COMMIT_SHA: Commit ID of the commit, which needs to be copied

Example:

git commit -x ef579afe0a4540dfced0576930cbf88568cb8a12

This will copy the commit from source branch and add it in current branch

Related