git - git不区分大小写吗?

标签 git version-control case-sensitive

在我的第一个 promise 部分_Electronics中,它以大写字母开头,然后我将其更改为_electronics

cygwin 下的 Git 在提交新名称后忽略了大小写,所以我在目标 repo 中手动更改了名称。

现在它有时会将提交的 _electronics 部分更改为 _Electronics

我做错了什么?

最佳答案

它将取决于 core.ignorecase 配置值,该值在区分大小写的文件系统中设置为 false,在 Windows 上的 msysgit 中设置为 true。

core.ignorecase

If true, this option enables various workarounds to enable git to work better on filesystems that are not case sensitive, like FAT. For example, if a directory listing finds "makefile" when git expects "Makefile", git will assume it is really the same file, and continue to remember it as "Makefile".

The default is false, except git-clone(1) or git-init(1) will probe and set core.ignorecase true if appropriate when the repository is created.

此回复中有更多详细信息 Changing capitalization of filenames in Git .

关于git - git不区分大小写吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8481488/

相关文章:

java - 在 java 中使用 SAX 解析 XML,不区分大小写。

git - 将开发分支中所做的修改移动到新的 git-flow 功能分支中?

version-control - DVC 如何将目录级别的差异存储到 DVC 缓存中?

version-control - 在线源代码控制

php - 具有差异突出显示的 PHP 中的文本版本控制

ms-access - VB6 ADO 记录集字段名称区分大小写取决于 Windows 语言设置

git - Jenkins 中的管道项目在 SCM(Git Hub)中 check out 后不会触发构建

git - 'git --bare init' 错了吗?

Git 通过摘要代理认证

node.js - 检查文件是否存在(区分大小写)