Erel Segal-Halevi Erel Segal-Halevi - 1 year ago 107
Git Question

Merge files with different end-of-line character

I work with GIT on Linux, and my colleague works with GIT on Windows.

I commited some changes to a file, and my colleague commited some other changes to that file.

My colleague pushed, and I pulled.

Now, my entire file is a one big conflict:

<<<<<<< HEAD
[my version]
[colleague's version]
>>>>>>> branch 'master' of

What can I do? How can I merge the changes?

Answer Source

From this article in github you can overcome such problem

the suggested eol is \n, you can use this to autoconvert

git config --global core.autocrlf input
# Set this setting on OSX or Linux

git config --global core.autocrlf true
# Set this setting on Windows

Have a look at the example what to do next.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download