Why does cherry pick conflicts in rows not affected by commit?

When I first read about git cherry-pick, I thought of it as applying the changes introduced by commit as a patch to HEADa new commit. My first few customs corresponded to this perception.

Later, I tried to make cherry a very simple commit from a diverging branch:

git cherry-pick ab797f0c

To my surprise, I had several conflicts in the lines that were not affected by the commit !!! the commit was very simple, 2 lines were changed in one file.

I tried EGit, which showed a note: "EGit uses an interactive search engine to select a cherry that is different from regular Git ...", but I have the same or similar conflicts!

I tried:

git diff ab797f0c^ ab797f0c |patch -p1

Which worked perfectly and handled the bias of the corn.

git/EGit , , patch? Git EGit?

Update:

, . : https://github.com/alhashash/cherry-test

cherry-test commits

test cherry-pick Cherry. git cherry-pick Cherry , , git diff Cherry^ Cherry |patch -p1 !

EGit git.

Update2:

, EGit. Git , .

Git . oddo OCB forked repo fb978c60 ab797f0

+4
1

, git cherry-pick , commit C , commit B. diff , patch 2 , git cherry-pick . patch -p1 -F0, .

, , diff , , , , . git cherry-pick , , . ( ). , -X (, -Xpatience, ). .

, , , , rerere . git config --global rerere.enabled. , , , . - , --continue, , .

+1

All Articles