VCS ignoring files/folders and the .idea folder

Hello!

The .idea folder seems to be permanently hidden in the Project tool window which is nice and everything but how on earth am I meant to tell my VCS to ignore that folder?  I don't want to commit my .idea folder because other developers don't need it.  I currently have to use an external VCS tool to manage ignoring .idea the folder (Tower for Git in this case).

In fact, come to think of it, how do you ignore anything using PHPStorm's VCS controls?



Thanks!
7 comments

Hi Red,

Accordingly to the official help page, "All the settings files in the .idea directory should be put under version control except the workspace.xml, which stores your local preferences. The workspace.xml file should be marked as ignored by VCS"

how do you ignore anything using PHPStorm's VCS controls?

http://www.jetbrains.com/phpstorm/webhelp/configuring-ignored-files.html

1

Firstly: thank you Andrily, you've answered my question.  I see now that PHPStorm LOCALLY ignores the workspace.xml file and prevents it from being managed by the VCS.  Not sure I agree with PHPStorm saying I "should" add the .idea directory to my VCS - surely I decide what I add? ;)  I wonder why they see it as useful?

Secondly: I should have marked your reply as the "correct answer" but it's my first time and clicked on "helpful answer" instead!  I can't seem to undo that.... sorry!

0

Andriy Bazanov answered this perfectly. Thank you Andriy!

0
Not sure I agree with PHPStorm saying I "should" add the .idea directory to my VCS - surely I decide what I add? ;)

I think it meant to be "could" instead of "should", as there is no real need to force putting it there.

I wonder why they see it as useful?

If you are working in a team and using the same IDE... you know -- some settings can be shared so that other team members will have exactly the same code style/scopes/etc/etc (one person updates and on next sync (or whatever the VCS term is) other devs will have it as well).

1

Yep, true, useful if everyone is using PHPStorm, sadly that's not the case for me as I am a freelancer who moves around a lot!  Many teams with many different set ups!

Thanks for your answer :)

1

Is there a way that I haven't found to not upload to git the .idea folder and it's contents?

0

Navigate to Settings | Version Control | Ignored Files and add .idea there, or, use .ignore.
This won't have any effect if the files are already added, you need to remove them first.

0

Please sign in to leave a comment.