Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add .idea/workspace.xml to gitignore?

Tags:

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)?

like image 818
CodyBugstein Avatar asked Dec 25 '14 14:12

CodyBugstein


People also ask

Should idea MISC xml be Gitignore?

idea/misc. xml should be ignored, but it is not in the generated gitignore file.

What is idea Workspace xml 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.

Should I ignore .idea files?

You shouldn't ignore the idea folder. you're supposed to commit almost all of it to the repo.

Where is Workspace xml located?

It is located in the root folder of the respective project, in the hidden folder .


1 Answers

Based on JetBrains you should not place the workspace.xml and tasks.xml in repo, as they contain user specific settings.

like image 103
Pran Avatar answered Oct 05 '22 13:10

Pran