Problem excluding workspace.xml from Git


I have .gitignore specified in my working folder. The .git repository is in the working folder too.

In .gitignore, I have specified .idea/workspace.xml - obviously, .idea is in the working folder too.

I have specified $ git rm --cached .idea/workspace.xml and this does remove the file from Git vc.

However, nothing seems to work - workspace.xml keeps popping into the default list and is therefore not being ignored.

Any advice please?


Comment actions Permalink

Hi Gazley,

  • Have you committed the deletion of .idea/workspace.xml from Git after you executed "git rm --cached idea/workspace.xml"?
  • Does the problem happen with any other files (to test it you could create a file, commit it, add to .gitignore and rm --cached and then commit)?
  • Does workspace.xml appear in the output of 'git status' command as well or only in the Changes View of the IDE?
Comment actions Permalink

Hi there,

Thanks for your help with this. I hadn't committed the deletion, as your correctly expected. Also, it turned out that the path in the .gitignore proved to be incorrect too. However, all is working well now and I really appreciate you help with this.

Just wanted to say how much I enjoy using PhpStorm and am looking forward to getting my upgrade to V2.

Thanks again.


Please sign in to leave a comment.