2013-09-24 64 views
0

應用:全球GIT忽略:不拉

git config --global core.excludesfile ~/.gitignore_global 

試圖消除$ HOME變量:

git config --global core.excludesfile ~/.config/git/ignore 

不能讓它適用於我的地方項目太多了。就像我喜歡看到我的.sass-cache文件夾出現在每個項目上一樣,真的很想從GIT中隱藏這個文件夾...

希望可以做一個簡單的which -a gitignore來找出正在使用哪一個。會很棒。

非常感謝任何線索。

+1

你的'.gitignore_global'文件是什麼樣的? 'git config --get-all core.excludesfile'的輸出是什麼? – jszakmeister

+0

從github抓取推薦的.gitignore文件。但增加了這個: '.ssas-cache .ssas-cache/*' 不知道'git config --get-all core.excludesfile'命令。寫入'/ Users/josh/.config/git/ignore' – Josh

+0

這是應該用於忽略的文件。如果它不起作用,那麼忽略文件可能有問題(例如,規則拼寫錯誤)。 – jszakmeister

回答

1

使用:git config --get-all core.excludesfile

編輯後的文件提交。作品。感謝@jszakmeister