Cherry-pick single commit from other Git repository100 words - 1 min read
To perform a cherry-pick one commit form repository placed in another folder, just run the following command:
$ git –git-dir=..//.git format-patch -k -1 –stdout | git am -3 -k
This command create a patch from the repository in the some-other-repo’s of commit specified by its SHA (-1 for one single commit alone). This patch is piped to git am, which applies the patch locally (-3 means trying the three-way merge if the patch fails to apply cleanly).