Assume something like the following:
HEAD/master
|
A<--B<--C<--D<--E<--F<--G<--J
^
official
Where official
is a branch.
I wanted to cherry-pick 2 commits to official
branch e.g.E
and J
Both these commits were fixes affecting the same 3 files.
When I did git cherry-pick E
it went fine but when I did git cherry-pick J
I got some conflicts.
Looking at the diffs I realized that I needed to also cherry pick commit F which did a change in two of those 3 files which change was basically a method definition change and J
was done on top of that.
So it was easy to fix by just doing git cherry-pick F && git cherry-pick J
Question:
If I wasn't aware of the changes done in those files and commit F was a big commit changing many files: Is there another way to figure out on which commit a commit we are trying to cherry pick depends on without manually doing a git log on the file and going commit by commit?