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!
Please sign in to leave a comment.
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"
http://www.jetbrains.com/phpstorm/webhelp/configuring-ignored-files.html
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!
Andriy Bazanov answered this perfectly. Thank you Andriy!
I think it meant to be "could" instead of "should", as there is no real need to force putting it there.
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).
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 :)
Is there a way that I haven't found to not upload to git the .idea folder and it's contents?
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.