如果./idea已经在版本中,则.gitignore配置会失效,用git rm –cached -r .idea/可移除(在代码库中去除,又能保留本地的.idea文件夹)
.gitignore文件内容
.HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
*.iws
*.iml
*.ipr
.git
.svn
#.gitignore
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
/.idea/