Before we get further, let's draw a fix graph:
A <-- master (HEAD)
\
B--C--D--E <-- foo
or so that you can compare, here's the Git way draws it:
$ git log --all --decorate --oneline --graph
* 7c29363 (foo) five
* a35e919 four
* ee70402 three
* 9a179e6 two
* d443a2a (HEAD -> master) one
(Note that I included your question in the command sequence that I added, my hashes are of course different from yours.)
Cherry-pick - a peculiar form of merging
, , , git cherry-pick . - .
( - , ) git merge other. Git , other, , , . , :
o
/
...
\
o
commit B ( ).
, Git git diff s, commit L , R ( ). :
git diff --find-renames B L
git diff --find-renames B R
Git , B, , L, R. - , "" . , "" .
, Git , . , "merge" .
, Git - , , . - , .
E. , Git () commit D , A / L commit E R. Git :
git diff --find-renames D A
git diff --find-renames D E
, : , two, three four. , , : five.
merge.conflictStyle
- , , 😅 - merge.conflictStyle diff3. , , <<<<<<< .., Git , |||||||:
one
<<<<<<< HEAD
||||||| parent of 7c29363... five
two
three
four
=======
two
three
four
five
>>>>>>> 7c29363... five
, Git , , .
, , commit E, - "" commit A. , . , . Git, , .
: script
#! /bin/sh
set -e
mkdir t
cd t
git init
echo one >f
git add f
git commit -m "one"
git checkout -b foo
echo two >>f
git commit -a -m "two"
echo three >>f
git commit -a -m "three"
echo four >>f
git commit -a -m "four"
echo five >>f
git commit -a -m "five"
git checkout master
git cherry-pick foo