我应该将.idea/workspace.xml添加到gitignore吗? [英] Should I add .idea/workspace.xml to gitignore?

查看:160
本文介绍了我应该将.idea/workspace.xml添加到gitignore吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试签出另一个分支时,出现此错误:

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

我做了一些研究,似乎有些人通过将引用的文件添加到gitignore来避免此问题.

I did some research and it seems some people avoided this problem by adding the afformentioned file to gitignore.

这是明智的选择吗?如果git忽略了workspace.xml文件,这会不会破坏您在IDE中的体验(在我的情况下为Jetbrains Webstorm)?

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

推荐答案

基于

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

这篇关于我应该将.idea/workspace.xml添加到gitignore吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆