Monthly Archives: March 2010

Git and Cherries

0
Filed under Development
Tagged as , ,

Today I needed to pick some specific changes from a local git branch and merge them to another. git cherry-pick does the job.

Usage:

git log source_local_branch #check the sha1 hash of the commit we want
git checkout destination_local_branch #switch to the branch we want to merge the commit.
git cherry-pick -x <commit_id>

the -x parameter adds the original commit id to the commit message.