Kirito K
Kirito K

Reputation: 39

.gitignore ignore the Intellij IDEA

I have a question about .gitignore. enter image description here

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:

enter image description here

Upvotes: 1

Views: 12490

Answers (3)

Erçin Akçay
Erçin Akçay

Reputation: 1423

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 .

Upvotes: 0

VonC
VonC

Reputation: 1329582

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/

Upvotes: 4

Vitalii Chmovzh
Vitalii Chmovzh

Reputation: 2943

You should just put .idea without ../ in the .gitignore

Upvotes: 0

Related Questions