Git marks entire file as conflicted when merging master into branch

Possible Duplicate:
What's the best CRLF handling strategy with git?

I’m currently working on a project where almost every time I merge master into my branch, I get merge conflicts where git says the entire file has changed. Often when I compare these files using Notepad++’s compare tool, it reports that only a couple of lines have actually changed and often it shouldn’t even result in a conflict.

  • Is it possible to link directories in git?
  • Can I have Mac, Windows, and linux share a git repo without line ending horror?
  • svn rename problem
  • What's the best CRLF (carriage return, line feed) handling strategy with Git?
  • How to handle dependencies in cross platform C++ projects?
  • git pull errors
  • For a while I’ve simply put up with this behaviour as a problem that has to be suffered whilst working cross-platform (our team uses a mixture of windows 7, OSX and debian for development), but today when I merged there were some serious issues which are stopping me from moving forward. I’ve looked into this myself and it seems that it might be related to the git core.autocrlf config, but I’m unsure how to solve this issue so that either it goes away immediately, or will slowly disappear as git fixes the damage I’ve previously done. Could anyone give any suggestions as to how to fix this?


  • Why are there two different lines with core.autocrlf output with “git config -l”?
  • How to make server automatically push to Encrypted Git Repository after recieving Unencrypted push
  • Git-svn merging and committing branches
  • Git change working directory
  • will fetch/merge not work if files are added or deleted in GitHub repository?
  • Does SmartGit support git-svn?
  • One Solution collect form web for “Git marks entire file as conflicted when merging master into branch”

    I’ve finally resolved this problem – I had to enable autocrlf. I’ve read a lot of recommendations against this flag, but it appeared to work in this case.

    git config --global core.autocrlf true

    Git Baby is a git and github fan, let's start git clone.