1.File–>Settings…–>Browse repositories–>搜索.ignore,点击安装 2.生成.gitignore文件,配置.gitignore文件,将要忽略提交的文件类型写入文件即可。