git cherry-pick multiple commits
12,547
git cherry-pick $from_sha..$to_sha
Related videos on Youtube
Author by
BJ Dela Cruz
I am a software developer and cybersecurity professional with 8+ years of industry experience. My main interests are mobile and web development, cloud computing, and cybersecurity.
Updated on September 15, 2022Comments
-
BJ Dela Cruz over 1 year
Possible Duplicate:
How to cherry pick a range of commits and merge into another branchI want to cherry-pick 19 commits from one branch and apply them to another branch. All of the commits are sequential (commit 1, commit 2 ... commit 19), and the last commit is not the most recent commit (i.e. there are other commits that come after it whose changes I don't want to apply). How can I apply my changes to a branch without typing
git cherry-pick
for each commit? -
g19fanatic over 11 yearsdefinitely the proper way of doing this :)
-
Uri about 11 yearsCould you do
git cherry-pick HEAD..branch-name
? -
PDK about 6 yearsNB.
^
(stackoverflow.com/a/1994491/3419541) …if you want to pick the range hash1 through hash19 (inclusive) that would behash1^..hash19
—nothash1..hash19
. -
0andriy almost 5 yearsDon't remember from which version, but
git cherry-pick -<NUM_OF_COMMITS> <HASH_OF_LAST_COMMIT>
works as a charm!