首页 > 解决方案 > 如何跳过生成 .gitattribute 文件?

问题描述

我必须不包含 .gitattribute。但是 subgit 将其添加到存储库中。我可以知道如何停止 subgit 添加 .gitattribute 文件吗?

标签: gitsubgit

解决方案


SubGit 在两种情况下添加 .gitattributes 文件:当translate.eol s 设置为 'true' 和translate.otherProperties设置为 'true' 时。后者默认为“假”,因此我相信正在创建 .gitattribiutes 文件,因为“eols”为“真”。为防止创建 .gitattribiutes 文件,应在 SubGit 配置文件中将设置设置为“false”:

[translate]
     eols = false
     otherProperties = false

这里的问题是设置不能即时更改,必须在初始翻译之前设置。因此,如果镜像已经建立,您需要重建它以应用这些设置:

subgit install --rebuild

之后,文件不应再出现。


推荐阅读