$ cat ~/.gitconfig
[core]
editor = vim
excludefiles = /home/augustin/.gitignore
$ cat ~/.gitignore
toto
$ mkdir git_test
$ cd git_test/
$ git init
$ touch toto
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# toto
nothing added to commit but untracked files present (use "git add" to track)
$ git --version
git version 1.6.3.3
爲什麼toto不被忽略?爲什麼我的全局.gitignore文件忽略?
〜/ .gitconfig中的其他設置會被考慮在內(顏色,編輯器)。
'git config --global core.excludesfile〜/ .gitignore'。找到它[這裏](http://crucial-systems.com/global_gitignore),目前無法測試它 – ierax 2011-03-11 09:21:19
@faif:那有效。提交這個答案,以便我可以接受它。謝謝。 – augustin 2011-03-11 09:31:28
我做到了。也謝謝你:) – ierax 2011-03-11 09:56:22