简体   繁体   中英

.gitignore ignore the Intellij IDEA

I have a question about .gitignore . 在此处输入图片说明

I use Intellij IDEA to automatically generate what folders to ignore. In .gitignore it wrote ../.idea/ . In the git status view, I still can see it:

在此处输入图片说明

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM