Problem: You want to test a feature someone has developed, but it only
exists in a remote branch which is woefully out of date.
- How does cherry-pick solve the problem?
- Why won’t I use git am or git apply?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you merged or rebased, you’d get a bunch of old changes in, possibly conflicting.
With cherry picking, you take one change set, and replay that as a new commit over another branch.
This is useful if you just want one commit onto another branch, without its history.
It’s useful to use the
-xoption, so the commit message contains a note where it was cherry picked from.because git apply is for applying patches (files), and git am for applying series of patches. git cherry-pick applies commits – i.e., commits from your own repo, vs commits you import from other repos.