Android and git line break

I'm going to put an android project in a git repository, but I'm a little unsure of line endings

My project currently lives on windows, so autocrlf is set to true, but when I made the initial commit, I received the following warnings:

warning: LF will be replaced by CRLF in the file /project/file.name The file will have the original line endings in your working directory.

First, how are some files LF when I'm on windows: -S? Is it because the android is based on Linux and expects them to be LF, not CRLF? Secondly, how does this happen when he wants to pass them as CRLF? I thought that "autocrlf true" should be styled as windows, but registration as UNIX?

In the summer, I want to be able to use both my mac, linux, and windows machines to work on this project. What is the best procedure for this? (I always used the "autocrlf input" for mac / linux and "autocrlf true" for windows in the past, and I had no problems, but this is my first Android project that I am going to insert in GIT, and apparently behaves differently)

+2
source share
1 answer

Just don't worry, autocrlf : keep it false .
See Also, " How line ending conversions work with git core.autocrlf between different operating systems ."

If you use editors that do not change EOL, you can fully work with LF eol on the platform.

If you use some files for which you must force eol, use the gitattribute eol directive.
See " Distributing git configuration with code ."

+1
source

All Articles