.gitignore and .idea/workspace.xml

Answered

Hi,

Can someone please tell me how to ignore the .idea/workspace.xml file?

Thanks!

1
6 comments

Hello John,

Just add '.idea/workspace.xml' to the .gitignore file.

If you have already committed the file, then ignoring won't have any effect. You have to remove the file from the repository first:
git rm --cached .idea/workspace.xml

5

Excellent! 

Useful!

0

I am trying to ignore workspace.xml in both Rider and Webstorm

In my Webstorm .gitignore I put the .idea/workspace.xml and that works perfectly.

However it does not work for Rider because the file is buried in multiple .idea directories.

I've tried everything to get rid of this damn file, to no success.

How can I ignore it please ?

0

I think I was too hasty to send you to Rider. Would */.idea/workspace.xml work or you?

The previous message where I was hasty:

It makes sense to ask the Rider support about that: https://rider-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=97145

This is a PhpStorm forum branch, we don't have multiple .idea folders.
0

Hello Anthoni,


Please make sure that you put ".idea/workspace.xml" in the corresponding .gitignore file which cover all your ".idea" directories.
In other word: all ".idea/workspace.xml" files should be child of one parent directory which contain .gitignore. Otherwise you should create another .gitignore in most top-level directory of the project.   

0

Hi Dmitry,

It never occurred to me that I could put another .gitignore file inside the lower .idea folder and the have that just ignore the workspace.xml file.

Thank you. I am kinda new to the whole git version control, but I am getting there.

0

Please sign in to leave a comment.