Assuming I am the maintainer of a repo, and I want to pull in changes from a contributor, there are a few possible workflows:
- I
cherry-pickeach commit from the remote (in order). In this case git records the commit as unrelated to the remote branch. - I
mergethe branch, pulling in all changes, and adding a new "conflict" commit (if needed). - I
mergeeach commit from the remote branch individually (again in order), allowing conflicts to be recorded for each commit, instead of grouped all together as one. - For completeness, you could do a
rebase(same ascherry-pickoption?), however my understanding is that this can cause confusion for the contributor. Maybe that eliminates option 1.
In both cases 2 and 3, git records the branch history of the commits, unlike 1.
What are the pro's and con's between using either cherry-pick or merge methods described? My understanding is that method 2 is the norm, but I feel that resolving a large commit with a single "conflict" merge, is not the cleanest solution.