我想告诉git忽略例如jpg文件,无论扩展是如何编写的.
例如
*.JPG
应该忽略
.jpg,.JPG.,.jpg
等等
如果没有告诉git完全忽略案例,这可能吗?
Tod*_*obs 20
在大多数情况下,您可以告诉git忽略大小写,包括在.gitignore文件中.所有你需要的是:
git config core.ignorecase true
Run Code Online (Sandbox Code Playgroud)
从实际的角度来看,可能存在权衡取舍.git-config(1)手册页说:
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.
Run Code Online (Sandbox Code Playgroud)
因此,如果您使用的是区分大小写的文件系统,则可能会遇到麻烦.你的旅费可能会改变.
| 归档时间: |
|
| 查看次数: |
13976 次 |
| 最近记录: |