This error can occur when you have changed the core.autocrlf config option but have not deleted and re-checked-out your working tree.
So either change core.autocrlf back to what it was, or push up your changes, delete your repo and clone it again.