I know that similar questions have been asked, but I still can't get it to work.
My project is shared between people using different operating systems, and I'm on OSX. In addition, not everyone uses git, but sometimes I have to make changes to others.
Sometimes out of nowhere git says there are pending changes. Looking at the files, they look the same:
@@ -1,6 +1,6 @@ -<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" -> - <Deployment.Parts> - </Deployment.Parts> -</Deployment> +<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" +> + <Deployment.Parts> + </Deployment.Parts> +</Deployment>
I suspect this is a line ending problem.
[edit] One external demarcation tool specifically says: "status: 1 difference. Line endings differ - left: Windows (CRLF), right: Unix (LF)"
Following some online tips, my configuration looks like this:
[core] excludesfile = /Users/nathanh/.gitignore_global autocrlf = input attributesfile = /Users/nathanh/.config/git/attributes whitespace = cr-at-eol
And my attribute file:
# Ignore all differences in line endings * -crlf
Why does this still show me that the files are modified?
source share