3

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

4

2 回答 2

5

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

[translate]
     eols = false
     otherProperties = false

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

subgit install --rebuild

之后,文件不应再出现。

于 2018-08-14T09:22:21.603 回答
1

正如SubGit在“ SVN、Git 和 SubGit 中的行尾处理”中解释的那样,需要这些.gitattributes文件,尤其是在转换后从 Git 存储库推回 SVN 时。
参见例如“ SubGit and.gitattributes ”。

但是对于从 SVN 到 Git 的一次性转换,您可以简单地删除任何.gitattributes文件,添加并进行最终提交,记录这些删除:

 find . -name .gitattributes -delete
于 2018-08-14T04:48:58.763 回答