若是新的.gitignore 新建.gitignore在.gitignore里面添加.gitignore即可忽略它自己 若是已提交的.gitignore git rm --cached在.gitignore里面添加.gitignore即可忽略它自己 参考:https://help.github.com/articles/ignoring-files/