aar*_*bor 6 java linux windows git core.autocrlf
在这一点上,我觉得我已经阅读了关于 core.autocrfl 的所有在线文章以及在 中指定行尾的各种方法.gitattributes,但我仍然无法真正弄清楚我需要什么。
我们整个团队在 Windows 上开发,我们的应用程序部署到 Linux。我想控制整个策略的使用,.gitattributes以便没有人担心更改他们的设置。我的.gitattributes文件的当前配置如下,从这个 git repo稍微修改
我们有一个 Java 项目并在 Eclipse 中开发,因此查看 LF 结尾的文件不是问题。目前,我并不乐观,但我想我们在存储库中有混合的结局。
我的目标是:
开发人员不必担心更改 Git 中的设置等。
由于在结帐时自动执行行结束更改,因此克隆存储库不应使其处于修改状态,从而要求开发人员提交他/她没有更改的文件
我将.gitattributes文件更改为下面的文件并删除了索引,由于行尾,我现在有超过 3000 个文件待提交。如果我提交这个,我的问题会得到解决吗,我的上述要求会得到满足吗?
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.css text
*.df text
*.htm text
*.html text
*.java text
*.js text
*.json text
*.jsp text
*.jspf text
*.properties text
*.sh text
*.tld text
*.txt text
*.xml text
*.conf text
*.xsd text
*.jrxml text
*.vm text
*.prefs text
*.dtd text
*.crt text
*.key text
*.ccf text
*.prefs text
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.gif binary
*.ico binary
*.jar binary
*.jpg binary
*.jpeg binary
*.png binary
*.so binary
*.war binary
*.swf binary
*.bmp binary
*.doc binary
*.docx binary
*.dotx binary
*.pdf binary
*.xls binary
*.xlsx binary
*.xlsm binary
*.xltm binary
*.ttf binary
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
426 次 |
| 最近记录: |