When trying to switch git branches, I lose all of my settings

If I have WebStorm open with my project, go to PowerShell to do a git branch switch, but receive an error about my changes need to be committed before proceeding, when I come back to WebStorm, it gives me an error message, and I lose the majority of my settings.  When I say majority, I'm talking things like what beautifiers I had turned on, items I added to the Content Root, etc.  I do not lose my editor settings like spaces instead of tabs, etc.  I wanted to start a thread to see if there was an issue already like this out there... if not, I will try and add the error message that WebStorm throws, but I'm not sure it'll be very helpful.

Just to reiterate, this happens when git throws an error in PowerShell.  On a normal branch switch without the git error message, everything is fine, and I don't lose my settings.

6 comments

I'm not sure what the issue has to do with WebStorm... You are running Git in your system terminal, outside of WebStorm, and face some issues that result in losing project files (settings you have mentioned are normally stored in the project `.idea` folder). Can't see what can be done on IDE end to fix this...

0

Why wouldn't I lose my settings on changing to any branch then?  My settings are not saved in the git repo... they are saved outside of it.  So basically what I'm saying is, WebStorm shouldn't freak out and lose my settings if changing to a different branch fails.  This is a WebStorm monitoring the git branch issue.

0

> This is a WebStorm monitoring the git branch issue.

Are you using WebStorm Git integration, or perform all Git actions externally, outside of WebStorm? Do you have your project .idea files version controlled?

1

I perform the majority of the operations outside of WS.  It does look like someone checked in the .idea dir in that project, yes.  I'm going to try and remove that from git to see if it helps any.  It still wouldn't explain why those settings get wiped out... if the branch doesn't actually change because of an error on switching, the settings shouldn't be lost.

0

If the Git integration is not used, and Git commands are run externally, then all WebStorm does is reading files from disk. Looks as if the files on disk get removed/corrupted/replaced as a result of your actions, and this is not a thing IDE can be blamed for

1

Interesting, so you're saying if I performed all of my actions from the IDE then I shouldn't see this issue?  I'll have to try that at some point... but first, let me try removing the .idea from version control and see if that helps.

0

Please sign in to leave a comment.