在 VS2010 项目中使用 git:无法添加文件 *.opensdf
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5088398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using git for VS2010 project: Can't add file *.opensdf
提问by mort
I'm using git to track a C++ project in VS2010. I'm using ignore patterns found on stackoverflow, which usually do not exclude the *.opensdf file. Unfortunately, when trying to commit the file, I get the following error:
我正在使用 git 跟踪 VS2010 中的 C++ 项目。我正在使用在 stackoverflow 上发现的忽略模式,它通常不排除 *.opensdf 文件。不幸的是,在尝试提交文件时,我收到以下错误:
error: open("foo.opensdf"): Permission denied
error: unable to index file foo.opensdf
fatal: adding files failed
Why do I get this error and how can it be avoided? Since I'm quite a newbie with VS2010, what is the use of this file?
为什么会出现此错误以及如何避免?由于我是VS2010的新手,这个文件有什么用?
Thanks!
谢谢!
mort
死
回答by Pete
*.opensdf is a temporary file opened only while .vcxproj/.sln is loaded to Visual Studio IDE. It should be added to your .gitignore file.
*.opensdf 是一个临时文件,仅在 .vcxproj/.sln 加载到 Visual Studio IDE 时打开。它应该添加到您的 .gitignore 文件中。
See the accepted answer on this question: What should be contained in a global source code control ignore pattern for Visual Studio 2010?
请参阅有关此问题的公认答案:Visual Studio 2010 的全局源代码控制忽略模式中应包含什么?