When I try to checkout another branch, I get this error:
error: Your local changes to the following files would be overwritten by checkout:
.idea/workspace.xml
Please, commit your changes or stash them before you can switch branches.
Aborting
I did some research and it seems some people avoided this problem by adding the afformentioned file to gitignore
.
Is this a wise thing to do? If git
is ignoring your workspace.xml
file, won't it mess up your experience in the IDE (in my case, Jetbrains Webstorm)?
idea/misc. xml should be ignored, but it is not in the generated gitignore file.
The workspace. xml file stores personal settings such as placement and positions of your windows, your VCS and History settings, and other data pertaining to the development environment. It also contains a list of changed files and other sensitive information. These files should not be present on a production system.
You shouldn't ignore the idea folder. you're supposed to commit almost all of it to the repo.
It is located in the root folder of the respective project, in the hidden folder .
Based on JetBrains you should not place the workspace.xml and tasks.xml in repo, as they contain user specific settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With