If you are sitting in a conflicting merge as part of a rebase, you are kind of stuck. That is why, how and what you can do.
Rebase = Cherry Picker
Basically, a redirect operation in Git is just a series of sweet cherry operations. Let's start with something like this:
...
\
B1
and we want to end up with:
...--A1--A2--A3--A4--A5 <-- branchA
\ \
\ B1'-B2'-B3' <-- branchB
\
B1--B2--B3 [abandoned]
, ( Git) , - git cherry-pick - commit B1 ( ) A5, B2, B1' ..
git cherry-pick "", . rebase , git cherry-pick.
, , Git . . rebase. , , "" , Git , , rebase. Git , Git rebase .
, , Git - , . , README, file otherfile, .
, , , Gitty. , , - .., Git . ( , , rebase.)
. , . , ( ), . 1-3, , , . 1 ( ), "" --ours --theirs "remote" . - , , git add . - , 1-3 . .
1 , 0 , 1-3 , 0 1-3. , 1, 2 / 3 , , / /, "0 , 1-3 ", .
, , . .
( "the" ) , , , , , ( ).
, , git add / git commit , . , Git , : 1-3 , Git , .
- ; .git/index . - "", - . ( , Git "" , "" , . Git .)
, , , . , , : .
, " B", , B2, . :
...--A1--A2--A3--A4--A5 <-- branchA
\ \
\ B1' <-- HEAD
\
B1--B2--B3 <-- branchB
. " ": Git . HEAD .
, ( , ) , , , ( ), git commit commit B2':
...--A1--A2--A3--A4--A5 <-- branchA
\ \
\ B1'-B2' <-- HEAD
\
B1--B2--B3 <-- branchB
- , , git commit. , , HEAD :
$ git branch saveme
:
...--A1--A2--A3--A4--A5 <-- branchA
\ \
\ B1'-B2' <-- HEAD, saveme
\
B1--B2--B3 <-- branchB
:
$ git rebase --abort
Git branchB:
...--A1--A2--A3--A4--A5 <-- branchA
\ \
\ B1'-B2' <-- saveme
\
B1--B2--B3 <-- HEAD->branchB
, , . ( Git) B1', commit B2', , . commits saveme~1 saveme, ; saveme, .