我正在Windows机器上运行xampp。我有一个在c:/ xampp/htdocs本地运行的git repos负载,并希望添加一个全局忽略来忽略所有这些repos的applications/config文件夹中的数据库配置文件。global gitignore被忽略
我在htdocs文件夹中创建了.gitignore_global,然后在htdocs文件夹中运行git config --global core.excludesfile .gitignore_global
,然后导航到我的某个回购站并运行git rm --cached application/config/database.php
,然后添加,提交并推送。该文件在github上删除,没问题,但是当我修改database.php并运行git status
时,它显示了那里的文件,等待添加....我研究了这个并尝试了一些东西,但无法看到什么我做错了...任何想法?
什么在你的'.getignore_global'? – CharlesB 2012-04-25 22:28:20
字面上只是'database.php'。它应该包括路径吗? – 2012-04-25 22:34:54
用'git config --get core.excludesfile'检查你没有'core.excludesfile'的本地覆盖。 – CharlesB 2012-04-25 22:48:16