Git: where the conflict occurs when the reboot occurs

Suppose I have a commit history like this

              master
               |
|A| -> |B| -> |E|
        |
       |C| -> |D|
               |
              hotfix

Assume that fixing E and D has conflicts. Now, according to the docs , after rebase

$> git checkout hotfix
$> git rebase master
# fix conflicts
$> git add -A
$> git rebase --continue
$> git push --force # rewrite history of branch hotfix on remote

I get

              master
               |
|A| -> |B| -> |E|
               |
              |C| -> |D|
                      |
                    hotfix

However, I do not see where my merger / conflict results go? If I rebase again

$> git rebase master

I do not expect the same conflicts to recur, right?

The final question is, if commit D was before commit E, will the chart shown above (the result after rebase) be the same?

+3
source share
2 answers

However, I do not see where my merger / conflict results go?

rebase git .git. (, .git/rebase-merge.) , rebase.

... , ?

, , () rebase.

, D E, ( rebase) ?

, C D , , , E - , ' t , . , D' C', , D C, .

+5

rebase, , git, " ", . , -: "" C D, C' D'. , "" ( , ). , ( , , : E B , D C, C B, B A):

A <-- B <-- E    <-- master
       ^
        \
          C <-- D   <-- hotfix

rebase, git cherry-picks commit C, C' E ; cherry-picks D, D' C' . ( ), . , , D', git hotfix, D':

A <-- B <-- E    <-- master
      ^      ^
      |       \
      C - D    \
                \
                 C' <-- D'  <-- hotfix

commits, C D, ( , hotfix branch reflog , , rebase ORIG_HEAD, D). , , " hotfix", , .

, commit D' ( , , ). commit D reflog ORIG_HEAD, D D', , :

$ git diff ORIG_HEAD hotfix

. ( E, , , .)

( , , , diff , "". C E, C', git diffs B C. , cherry-pick D, git diffs C D, diff C' . , D E, D', , .)

+3

All Articles