Where is my idea/workspace.xml file located? I cant find it in Pycharm, I cant find it in finder (searched entire Mac). I get the error
error: Your local changes to the following files would be overwritten by checkout: .idea/workspace.xml
which I know has been asked alot. I tried ignoring the file with no luck (maybe because I accidentally committed it previously), and I tried adding it a bunch of different ways with no luck. Is the right thing to do to remove it from the repo (not sure how to do that) or to continue to add it, if the latter where do I find this thing.. How did it accidentally get committed if I cant even find it now.
Asked
Active
Viewed 3,431 times
-1

bgse
- 8,237
- 2
- 37
- 39

ratrace123
- 976
- 4
- 12
- 24
-
Are you on a unix OS? – JacobIRR Nov 20 '17 at 00:25
1 Answers
3
It is located in the root folder of the respective project, in the hidden folder .idea
, along with other PyCharm project settings.
From the official documentation:
All the settings files in the .idea directory should be put under version control except the workspace.xml, which stores your local preferences. The workspace.xml file should be marked as ignored by VCS.
According to this, the right course of action would be to remove the file from the repo, and add the following line to the .gitignore
file:
.idea/workspace.xml
Keep in mind that this is what JetBrains as the developers of PyCharm recommend, your project manager or colleagues might have another opinion on the matter.

bgse
- 8,237
- 2
- 37
- 39
-
hello, I am trying to remove it from the repo with `git rm --cached .idea/workspace.xml` but it is saying it did not match any file. I can see the file in my repo however... – ratrace123 Nov 21 '17 at 03:33
-
@ratrace123 Are you talking about the local or the remote repo? You might to [look at this question](https://stackoverflow.com/questions/7927230/remove-directory-from-remote-repository-after-adding-them-to-gitignore). – bgse Nov 21 '17 at 22:14
-
i am talking about the local repo, when i run the command `git ls-tree --full-tree -r HEAD` i see the file `idea/workspace.xml`. However everytime i try to remove it i get the same `fatal: pathspec 'idea/workspace.xml' did not match any files` – ratrace123 Nov 22 '17 at 02:00