Git Ignore - .idea/ user files

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

Which explains to exclude the following:

.idea/workspace.xml
.idea/tasks.xml



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).

Thanks!



Attachment(s):
gitignore.zip
5 comments
Comment actions Permalink

Hello Phil,

If you create a file in your repo named

.gitignore
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,
Oleg
0
Comment actions Permalink

Brilliant!  That did the trick.

Thanks Oleg.

0
Comment actions Permalink

Great, develop with pleasure!

0
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...

0
Comment actions Permalink

@Cg,

you can configure global .gitignore for that purpose.

0

Please sign in to leave a comment.