Git Ignore - .idea/ user files

I'm having trouble keeping the .idea/ workspace files out of my GIT repository.
I've followed this advice:

Which explains to exclude the following:


When this placed in my .gitignore file however it has not effect, and every change to a file within RubyMine causes the workspace.xml file to reappear in the GIT status as a changed file.

Is there something obvious I'm doing wrong here?  I've attached my .gitignore file (with the prefix . removed).


Comment actions Permalink

Hello Phil,

If you create a file in your repo named

git will use its rules when looking at files to commit. Note that git will not ignore a file that was already tracked before a rule was added to this file to ignore it. In such a case the file must be un-tracked, usually with
git rm --cached filename

Hope this helps,
Comment actions Permalink

Brilliant!  That did the trick.

Thanks Oleg.

Comment actions Permalink

Great, develop with pleasure!

Comment actions Permalink

Is it possible to ignore the .idea folder for all projects? If someone forgets to ignore the folder and commits it accidently our Git breaks...

Comment actions Permalink


you can configure global .gitignore for that purpose.


Please sign in to leave a comment.