git ignore line endings -


i know similar questions have been asked, still can't working.

my project shared among people using different operating systems, , i'm on osx. also, not uses git yet , end having commit changes of others.

sometimes, out of git says there pending changes. looking @ files identical:

@@ -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 line ending issue.

[edit] 1 external diff tool says: "status: 1 difference line endings differ - left: windows (crlf), right: unix (lf)"

following of online tips, configuration looks like:

[core]     excludesfile = /users/nathanh/.gitignore_global     autocrlf = input     attributesfile = /users/nathanh/.config/git/attributes     whitespace = cr-at-eol 

and attributes file:

# ignore differences in line endings *        -crlf 

why still showing me files modified?

read jetbrains.com

to have git solve such problems automatically, need set core.autocrlf attribute true on windows , input on linux , os x. more details on meaning of core.autocrlf attribute, see article mind end of line ordealing line endings. can change configuration manually running

git config --global core.autocrlf true  

on windows or

git config --global core.autocrlf input  

on linux , os x. however, intellij idea can analyze configuration, warn if commit crlf repository, , offer set core.autocrlf setting true or input depending on operating system used.

hopefully might shed light on problem.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -