git cherry pick multiple commits
# from the branch you want to apply changes
# it will bring all commit changes but also stage them
git cherry-pick <commit-hash>
# it will bring all commit changes but leave them unstaged
git cherry-pick -n <commit-hash> #OR
git cherry-pick --no-commit <commit-hash>
4
1
git cherry-pick A^..B
Thank you!
1
0
4
1
# A and B are commits
# A is older than B
git cherry-pick A^..B
# to ignore A itself, run:
git cherry-pick A..B
Thank you!
1
0
4.6
5
# To cherry-pick all the commits from commit A to commit B (where A is older than B), run:
git cherry-pick A^..B
# If you want to ignore A itself, run:
git cherry-pick A..B
Thank you!
5
0
3.88
8
To cherry-pick all the commits from commit A to commit B (where A is older than B), run:
git cherry-pick A^..B
If you want to ignore A itself, run:
git cherry-pick A..B
Thank you!
8
0
Are there any code examples left?
New code examples in category Shell/Bash