Git rebase causing merge conflicts on almost all files - even untouched ones

Typical behavior git rebase

is a relatively "clean" merge from base to local.

Sometimes everything happens in the south. Basically every file that has been touched in the database requires a manual merge with the local one - regardless of whether the files were even touched / modified locally

Why is this happening? Is there a reasonable solution?

Update

For some reason in this scenario

git pull

      

worked just fine . It required manual merging of one file - and that was correct manual merge.

So, I think this question has in a sense moved on to "what are the conditions in which it is required and not git rebase

. I will be looking for applicable Q&A.

+3


source to share


1 answer


One possible reason is the eol (end of line) characters, which may differ between the two branches.

Has completed the first round of call forwarding (with the Git 2.12:git rebase --quit

)

Try again with option (merge strategy) -X ignore-space-at-eol

to see if the problem persists.


Git pull works just fine

This is the difference between pull (fetch + merge) and rebase (replay commits)



 x--x--x--x--X     (master)
        \
         --o--o--O (origin/master)

      

Attraction concatenates two HEAD records X

and O

, which can differ by only one file.

 x--x--x--x--X-----M     (master after git pull)
        \         /
         --o--o--O (origin/master)

      

Rebase (or git pull --rebase) will play master over origin / master, and previous commits " X

" can cause a lot of conflicts even if X

(HEAD) differs from only one file from source / master HEAD O

.

 x--x--x
        \         
         --o--o--O--x'--X' (master)
           (origin/master)

      

+3


source







All Articles