使用PHPStorm,我试图忽略workspace.xml每次尝试进行git提交时弹出的内容.
我.gitignore看起来像:
/.idea/
.idea/workspace.xml
Run Code Online (Sandbox Code Playgroud)
因为在某个时刻文件已经提交,我还执行了:
git rm --cached .idea/workspace.xml 然后承诺删除,推到一个裸的回购.
但是当我在项目中进行更改时,文件会不断弹出.
关于我失踪的任何想法?
当我尝试签出另一个分支时,我收到此错误:
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
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,似乎有些人通过添加前面提到的文件来避免这个问题gitignore.
这是明智的做法吗?如果git忽略了你的workspace.xml文件,它会不会搞乱你在IDE中的经验(在我的例子中,Jetbrains Webstorm)?