Is it possible for git-merge to ignore line-ending differences?

Update 2013: More recent git versions authorize using merge with strategy recursive and strategy option (-X): from “Git Merge and Fixing Mixed Spaces and Tabs with two Branches”: git merge -s recursive -Xignore-space-at-eol But using “-Xignore-space-change” is also a possibility Fab-V mentions below: git merge master -s recursive -X renormalize jakub.g also comments that the … Read more

Force LF eol in git repo and working copy

Without a bit of information about what files are in your repository (pure source code, images, executables, …), it’s a bit hard to answer the question 🙂 Beside this, I’ll consider that you’re willing to default to LF as line endings in your working directory because you’re willing to make sure that text files have … Read more

What’s the strategy for handling CRLF (carriage return, line feed) with Git?

Almost four years after asking this question, I have finally found an answer that completely satisfies me! See the details in github:help‘s guide to Dealing with line endings. Git allows you to set the line ending properties for a repo directly using the text attribute in the .gitattributes file. This file is committed into the … Read more

When do I use the PHP constant “PHP_EOL”?

Yes, PHP_EOL is ostensibly used to find the newline character in a cross-platform-compatible way, so it handles DOS/Unix issues. Note that PHP_EOL represents the endline character for the current system. For instance, it will not find a Windows endline when executed on a unix-like system.