Git 使用全局忽略文件忽略文件不起作用
Git ignoring files using global ignore file not working
我在主目录中创建了文件 .gitignore_global,然后 运行 命令:
git config --global core.excludefiles ~/.gitignore_global
然后我在文件 ~/.gitignore_global 中添加模式 *.tmp 以排除扩展名为 .tmp 的文件,但文件未排除为:
但是,在本地添加模式,即本地忽略是有效的。
这里有什么问题?
配置选项是core.excludesfile
,不是core.excludefiles
。
我在主目录中创建了文件 .gitignore_global,然后 运行 命令:
git config --global core.excludefiles ~/.gitignore_global
然后我在文件 ~/.gitignore_global 中添加模式 *.tmp 以排除扩展名为 .tmp 的文件,但文件未排除为:
但是,在本地添加模式,即本地忽略是有效的。
这里有什么问题?
配置选项是core.excludesfile
,不是core.excludefiles
。