1.
不要把配置文件放到你的 Git 代码仓库
https://www.oschina.net/translate/dont-include-configs-in-your-git-repos
2.
Git忽略提交规则 - .gitignore配置运维总结
http://www.cnblogs.com/kevingrace/p/5690241.html
ps: 如果.gitignore在文件提交到版本库之后更改 .gitigonre 规则将不会立即生效 需要手动删除代码仓库里的文件(注意不是物理删除!)
git rm --cached <filename>
https://www.cnblogs.com/rickqin/p/7068088.html