我向 Web 应用程序解决方案添加了一个类库项目。我收到错误消息“发生错误。详细消息:无更改;无需提交。”我在 visual studio online 上使用 git 存储库。
最佳答案
当 GIT 忽略文件或文件夹时,我在 VS2013 中看到了这个错误。您可以通过尝试从命令行添加来确认这一点。
例如,下面显示了 TestGit 项目的“bin”文件夹:
$ git add bin
The following paths are ignored by one of your .gitignore files:
TestGit/bin
Use -f if you really want to add them.
fatal: no files added
如果您确认这是问题所在,您将需要检查 .gitignore、.git/info/exclude 等并修复设置。您可以找到要使用的文件 git check-ignore如下:
$ git check-ignore -v bin
.gitignore:190:bin bin
此示例显示 .gitignore 文件需求的第 190 行导致 bin 文件夹被忽略。修复此允许将允许添加该文件夹(或其中的文件)。
注意:对于这个例子,我在 .gitignore 中添加了“bin”;它不是 Visual Studio 创建的 .gitignore 文件的一部分。
*更新:我什至不需要添加这一行。 Visual Studio 添加的 .gitignore 已经排除了“bin”文件夹。参见 github/gitignore/VisualStudio.gitignore了解更多详情。
关于git - 发生错误。详细消息 : No changes; nothing to commit. Visual Studio Online,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32417729/