**Visual Studio 2015,我应该将 Project.sln.ide\* 文件提交到 git 吗?

**Visual Studio 2015, should I commit Project.sln.ide\* files into git?

我正在使用 Visual Studio 2015 CTP,它正在生成一个名为 <project>.sln.ide\ 的新文件夹,其中包含一些文件,例如:

edb.chk
edb.log
edbres00001.jrs
edbres00002.jrs
edbtmp.log
storage.ide

我应该将这些文件(或整个文件夹)添加到我的 .gitignore 中吗?

如果应该将其添加到 .gitignore 中,正确的语法是什么?我想 *.sln.ide\ 会好吗?

您应该排除“*.ide”文件夹。

来自Microsoft: "It also contains a “.sln.ide” folder which is used by Roslyn Compiler engine to store temporary files. This folder should be excluded from the source control system normally."

在 GitHub 上找到的 Visual Studio 的 "default" .gitignore 包括对“*.ide”的排除,如 here.

其他协作者在其环境中编译源代码不需要的任何文件都应放入 .gitignore 文件中。如果您确定其他协作者使用与您相同的 IDE,则应将整个文件夹放在那里。

表达式 **.ide/ 用于阻止该目录。

现在,如果您不确定是否每个人都将使用相同的 IDE,您可以将相同的表达式放在 .git/info/exclude 中,这将为您创建一个排除条目在这个项目上。