IZ2VTW's Board

Cherry-pick single commit from other Git repository

100 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).

source: https://stackoverflow.com/questions/5120038/is-it-possible-to-cherry-pick-a-commit-from-another-git-repository#9507417

Updated: 2019-12-31 16:00:46 +0100 CET - Improve this page
Commit: "Move to new theme" [1014dbc]
By: Francesco Vezzoli <fvezzoli@villavasco.ovh>