git - 如何跳过生成 .gitattribute 文件?
问题描述
我必须不包含 .gitattribute。但是 subgit 将其添加到存储库中。我可以知道如何停止 subgit 添加 .gitattribute 文件吗?
解决方案
SubGit 在两种情况下添加 .gitattributes 文件:当translate.eol s 设置为 'true' 和translate.otherProperties设置为 'true' 时。后者默认为“假”,因此我相信正在创建 .gitattribiutes 文件,因为“eols”为“真”。为防止创建 .gitattribiutes 文件,应在 SubGit 配置文件中将设置设置为“false”:
[translate]
eols = false
otherProperties = false
这里的问题是设置不能即时更改,必须在初始翻译之前设置。因此,如果镜像已经建立,您需要重建它以应用这些设置:
subgit install --rebuild
之后,文件不应再出现。
推荐阅读
- c# - 为什么 .AspNet.ApplicationCookie Secure / SameSite 默认不设置为 Strict?
- python - 特定积分的期望值计算(通过 norm.pdf 和Integrated.quad)不适用于输入参数
- django - 如何在 Django 应用程序的用户配置文件模板中添加“删除”按钮,以便用户可以从应用程序中删除他/她的配置文件?
- c - 在链表中出现分段错误(核心转储)
- php - 需要具有自定义 Woocommerce 订单状态的批量状态更改功能
- c# - 使用表单 C# 将行添加到数据网格视图
- python - 散景:使用按钮单击从多个滑块更新
- git - GIT - 仅在不更改 .gitignore 文件的情况下忽略本地环境中的一些签入文件
- python - 为什么 python JSON 模块显示错误:json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- python - 正则表达式提取整数或浮点值,后跟一个单位,Python