Line output between Mac and Windows

I have a MacBook and am running Windows in Parallels VM. My development is primarily in Visual Studio, but I like to use Git with a Mac shell (and better than what is available for Windows).

When I do Git diff to determine what has changed between commits, I get the notorious line ending with “changes” that make Git think that a lot more has changed than it actually is.

I know this is an old problem, and I have done a lot of research with various suggestions from many people, but I cannot solve this problem. The most encouraging information was found in this SO Post , but it did not solve my problem.

Here are some relevant lines from my .gitconfig ...

[core]
    autocrlf = false
    safecrlf = false

Also, I have .gitattributes at the root of my repo, which only contains ...

* text eol=crlf

What can I do to make Git stop thinking about completing line changes, are the actual changes when diff is done? Again, I use the Mac shell to view Windows files, so this may be part of my problem.

Thank!

+5
source share
2 answers

I'm with an alias gdiff:

git diff -w origin/`git branch | sed --quiet "s/* \(.*\)/\1/p"`

but you can just do:

git diff -w
+2
source

Use a conversion utility like Perl, perl -i -pne "s/\n/\r\n/g"filename

or unix2dosand dos2unix.

See also http://en.wikipedia.org/wiki/Newline#Conversion_utilities

GIT . : LF eol GIT

+1

All Articles