今天发现本地修改gitignore怎么都不生效,查了资料才知道,如果远端已经有这个文件,那么就不会生效了,具体可以看这篇文章。 https://blog.csdn.net/qinyushuang/article/details/55210286