git 不使用 .gitignore 文件忽略某些文件
There are three ways to tell GIT which files to ignore:
.gitignore files
$GIT_DIR/.git/info/exclude
Files pointed to via the core.excludesfile setting
The latter two points could solve your problem.
原文链接:https://stackoverflow.com/questions/653454/how-do-you-make-git-ignore-files-without-using-gitignore