简体   繁体   中英

git: trying to merge branches, but there are TONS of conflicts, and most of them /shouldn't/ be conflicts

Here is a lot of what I'm getting:

<<<<<<< HEAD
code
=======
>>>>>>> Merge branch 'master' of code_url into not_master

and there are tons of those occurring multiple times in 40+ files. Is there a different way to merge such that it correctly resolves conflicts on its own? I feel like whenever it encounters any simultaneous difference in a location a file, git decides to flip ALL THE TABLES.

(╯°□°)╯︵ buıbɹǝɯ ʇıb

I looked at rebase, and it MAY have been what I have needed when I started the branch. To start rebasing - I still need to deal with all these conflicts.

I've often seen this when git has record of lines being deleted. It doesn't seem to want to auto-merge if a line has been edited in one branch but deleted in another.

Have you checked whether there are line ending differences? The above may stem from a line ending of \\r in the repo and and \\n in the working directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM