I have two branches that are very different from each other, however one branch contains some useful code that I would like to add to the other branch. The branches diverged so long ago that i cannot merge them as many of their features are different and a merge is not viable.
The useful code from the donor branch was added in consecutive commits and I have the hashes of the commits I want to cherry-pick. When I give the command git cherry-pick hash1 hash2
, I am told nothing to commit, working tree clean. The previous cherry pick ous now empty, possibly due to conflict resolution.
Is there a way to run through all the cherry-picks allowing any commits that will produce no change to pass automatically? I would rather not sit here and have to manually continue through each empty cherry-pick.