Git全局忽略不工作 [英] Git global ignore not working
本文介绍了Git全局忽略不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了文件 .gitignore_global
并将其放入我的git安装目录中。当我运行命令时:
git config --global core.excludesfile〜/ .gitignore
$ c
忽略文件中的规则不适用于我的提交。
当我重命名文件 .gitignore
并将其放入我的项目根目录时,规则适用。
什么是这里错了吗?
解决方案也许你需要做的:
git config --global core.excludesfile〜/ .gitignore_global
喝点咖啡。
I've created the file .gitignore_global
and put it in my git install directory. When I run the command:
git config --global core.excludesfile ~/.gitignore
the rules in the ignore file do not get applied to my commits.
When I rename the file .gitignore
and put it in my project root, the rules do apply.
What is wrong here?
解决方案 Maybe you need to do:
git config --global core.excludesfile ~/.gitignore_global
And to have some coffee.
这篇关于Git全局忽略不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文