.idea files appearing in commit window

Answered

This has probably asked by someone else recently, but I can't find it. 

Something changed in WS 2020.3 (I think).  What's happening is that files in the .idea folder are appearing in my commit window.  I have .idea in my global .gitignore, but that doesn't seem to help.  I don't ever want these files appearing in commit or in version control.  How can I remove them without deleting them?  WS needs them as part of its config.

0
6 comments

Also, this post keeps getting moved to Community > IntelliJ IDEA Users, and I have to move it back to Community > Webstorm.  This happened twice.  What's going on there?

0

Please don't move it back, it was moved intentionally, as IDEA is the host project for Git support, and you'll get better assistance in IDEA forum

0

> I have .idea in my global .gitignore

Webstorm relies on the command line git and checks for ignored files with git status --ignored command. So if the files are ignored and git recognizes them accordingly, they will be ignored in the IDE as well.

> I have .idea in my global .gitignore

How is you global gitingnore set up? Where is it located?

Does running git status in the native OS shell (that will be cmd.exe on Windows) in the project show the file as Unversioned?

The issue might appear if gtignore is configured in a way it is not available in the IDE context. E.g. you configure it in Cygwin, while IDE uses GitForWindows. Or there is some relative path somewhere that is different in the IDE context.

0

My workaround for now is to add .idea to gitignore, then add gitignore itself to that file.  This keeps webstorm from seeing those files as unversioned.

How is you global gitingnore set up? Where is it located?

It's just a regular .gitignore in my c:\users\username dir.  Same place as .gitconfig exists, which works.

Does running git status in the native OS shell (that will be cmd.exe on Windows) in the project show the file as Unversioned?

Yes.  It shows the .idea folder as untracked.  I suppose that implies that this may not be a webstorm issue.

0

Probably the path to the file is missing from the global git config. Make sure it is there.

See e.g. https://stackoverflow.com/questions/7335420/global-git-ignore

0

That helped, thank you.  I had that value set, but it must have gotten unset at some point.  I reset the value, then restarted webstorm, and now it works.  Thanks again!

0

Please sign in to leave a comment.