PhpStorm and GIT

I'm still in the trial period for PhpStorm and I have a question about GIT. How do I keep git from adding/commiting the hidden .idea files? Also is there a universal setting to block this at all times?


Thank you

6 comments
Comment actions Permalink

You may use: http://wiki.jetbrains.net/intellij/Using_Git_Locally_with_IntelliJ_IDEA .
Ignored files should be setup here: File | Settings (Preferences for Mac OS) | Version control | Ignored files.
Suggestions what files to ignore: https://intellij-support.jetbrains.com/entries/23393067 .

0
Comment actions Permalink

I don't see that option in PhpStorm under Version Control in settings?

I found the documentation on configuring local git ti unuverally ingore certain files.


https://help.github.com/articles/ignoring-files/

0
Comment actions Permalink

screen01.png

This is for PhpStorm 8.0.2 -- 8.0.1 and older will have slightly different settings structure. But in any case: you can always use quick search box in the top left corner to search trough settings.

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

0
Comment actions Permalink

Ok. I see it and ti was already set to that. I assume if I use the command line outside of PhpStorm it won't have the ignore rule applied to the GIT commands.

0
Comment actions Permalink

Sure - PHPStorm ignore patters won't affect Git run outside of PHPStorm. You have to set up .gitignore accordingly

0
Comment actions Permalink

The setting in PhpStorm where not working. It may be because I'm use GIT for Windows.

I figured it out I created a global ignore file in my user folder and added:

excludesfile = /users/myUserName/.gitignore_global

Where I told it to ignore:

.idea/
/.idea/

That completely fixed the issue at hand. I had to add the absolute path it wouldn't work with %USERPROFILE% it would just ignore my rules file.

Thank you,
David

0

Please sign in to leave a comment.