If your git status
shows ../.idea
, that means your .gitignore
is one folder below:
/path/to/repo
.idea
asubfolder
.gitignore
Make sure your .gitignore
is at the same level as .idea, and use:
.idea/
你应该把 .idea 不带 ../ 放在 .gitignore
Here it is what you generally need IDEA, Eclipse, NetBeans, target folder... in .gitignore
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
Be sure after this you run git rm -r --cached .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.