1.使用IDEA進行設置
ignore specified file:忽略指定的文件
ignore all files under:忽略文件夾
ignore all files matching:忽略所有匹配的文件(某一類文件)
根據需要選擇需要忽略的文件或者文件夾,直接添加進去就可以忽略提交!
2.使用模板
File --> setting --> Plugins --> 搜索 .ignore --> 安裝後重啓
然後你的項目右鍵點擊:
target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/