更新“.git 目录丢失”时作曲家错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21012061/
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
composer error while updating ".git directory is missing"
提问by doubleD
When I Updating zf-commons/zfc-admin using composer, it gives an RuntimeException error saying that
当我使用 composer 更新 zf-commons/zfc-admin 时,它给出了一个 RuntimeException 错误,说
[RuntimeException]
The .git directory is missing from /var/www/site2.com/vendor/zf-commons/zfc
-admin, see http://getcomposer.org/commit-depsfor more information
[RuntimeException]
/var/www/site2.com/vendor/zf-commons/zfc
-admin 中缺少 .git 目录,请参阅http://getcomposer.org/commit-deps以获取更多信息
Since this error i cannot update any other modules in framework.
由于此错误,我无法更新框架中的任何其他模块。
回答by NiGhTHawK
When ever I have "issues" with composer the first thing I do is delete the vendor folder and do a "composer update"
当我对作曲家有“问题”时,我做的第一件事就是删除供应商文件夹并进行“作曲家更新”
You could also try to delete just that one component "vendor/zf-commons"
您也可以尝试仅删除一个组件“vendor/zf-commons”
回答by Corneliu
The easiest way is to remove the install folder of that component before making the composer update
最简单的方法是在进行 Composer 更新之前删除该组件的安装文件夹
rm -rf /var/www/site2.com/vendor/zf-commons/zfc
composer update
回答by youly
delete zf-commons/zfc-admin then execute composer update. usually you are not adviced to commit zf-commons/zfc-admin to your repository
删除 zf-commons/zfc-admin 然后执行 composer update。通常不建议您将 zf-commons/zfc-admin 提交到您的存储库