Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android换行符和git_Android_Git - Fatal编程技术网

Android换行符和git

Android换行符和git,android,git,Android,Git,我即将把一个android项目放入git存储库,但我对行的结尾有点不确定 我的此项目当前在windows上运行,因此autocrlf设置为true,但当我进行初始提交时,收到以下警告: 警告:在/project/file.name中,LF将替换为CRLF 该文件将在您的工作目录中具有其原始行结尾 首先,当我在windows上时,为什么某些文件是LF?这是因为android是基于linux的,并且期望它们是LF而不是CRLF?第二,它为什么要将它们作为CRLF提交?我以为“autocrlf tru

我即将把一个android项目放入git存储库,但我对行的结尾有点不确定

我的此项目当前在windows上运行,因此autocrlf设置为true,但当我进行初始提交时,收到以下警告:

警告:在/project/file.name中,LF将替换为CRLF 该文件将在您的工作目录中具有其原始行结尾

首先,当我在windows上时,为什么某些文件是LF?这是因为android是基于linux的,并且期望它们是LF而不是CRLF?第二,它为什么要将它们作为CRLF提交?我以为“autocrlf true”应该作为windows签出,但是作为UNIX签入


总之,我希望能够同时使用我的mac、linux和windows机器来完成这个项目。处理这个问题的最佳程序是什么?(过去我总是在mac/linux上使用“autocrlf input”,在windows上使用“autocrlf true”,我没有遇到任何问题,但这是我第一个用GIT编写的android项目,它的表现似乎有所不同)

只是不必为
autocrlf
:。
另见“”

如果您使用的编辑器不会更改eol,则可以完全使用LF eol样式的accross平台

如果您发现一些必须强制执行eol的文件,请使用指令。
见“”