I cloned my project, that is I checked out a different git branch of the project to a different folder and copied over the .idea folder to have the same PHPStorm settings in the clone. I just need to have different branches of the same project independently in two folders, which I achieved successfully with the git worktree feature.
Now the problem is that certain (if not most of the) project settings are shared between the projects like the list of opened files, theme, PHP version and many other settings. When I open/close a file and switch to the other project the same files are open there. If I change a settings in one project, close it and switch to the other project, the same setting is applied there. How can I separate the settings from each other?
I did some search on the topic and the advice was to delete workspace.xml in the .idea folder. I did that and it helped for a while but now the problem came back. Maybe I shouldn't have copied all files .idea, if so then which ones? I keep the whole .idea folder in .gitignore so it's certainly not shared via git.