.gitattributes file, Unity, Sourcetree and Windows

Hi all

I’m switching to git from mercurial for my Unity version control.

I’ve setup my Unity project to handle metafiles and force text.
I’ve initialised my git repo
I’ve added a .gitignore file and a .gitattributes file to my root directory.
I’ve set my global settings for CRLF for Windows to be true using

git config --global core.autocrlf true

I can make an initial commit but any commit after this produces this error

What step am I missing?

Here is my .gitattributes file, from github

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

As long as you see the files on github/your preferred repo host, it’s fine. Windows and Linux use different characters to ends lines. Windows uses CRLF which is Carriage Return Line Feed, where as Linux uses LF. It shouldn’t be too important in the scheme of things. Mono usually asks me if I want to convert lines endings when I switch between my systems.

With some help from a good friend and the deletion of the config.core safecrlf in the .gitconfig file, this issue is now resolved!