Composer not generating .git folder for packages(Composer 没有为包生成 .git 文件夹)
问题描述
这很奇怪,好像我错过了一些小东西.几天前,当我 composer install 时,我得到了带有自己的 .git 的 Vendor 目录,这使我可以进行更改并更新自己的打包存储库.
This is weird, seems like something small that I'm missing. A few days ago, when I composer install I get Vendor directories with their own .git, this allows me to make changes and update my own packaged repositories.
今天运行composer install后,每个包文件夹内的.git目录不见了!(我认为这可能与从缓存安装有关?)
Today, after running composer install, the .git directories inside each package folder is missing! (I think this might have something to do with installing from cache?)
有人可以尝试重新创建这个吗?
Could someone please try re-create this?
$ git clone https://github.com/nathankot/rbhpi
$ cd rbhpi
$ ./composer.phar install
$ cd vendor/rbhpi/core
$ ls -a
从上面的命令中,.git 目录对我来说是缺失的.
From the above commands, the .git directory is missing for me.
我在文档中找不到这个规范,但我确实在 这个常见问题项目:
I couldn't find this spec in the docs, but I did find it in this faq item:
安装后删除所有依赖的.git目录
Remove the .git directory of every dependency after the installation
我的问题有什么解决方案吗?
Any solutions to my problem?
推荐答案
Composer 更喜欢你的依赖项的 dist 包,这意味着从 github 下载 .tgz 并解压它.如果您想要源代码,请使用
Composer prefers the dist package of your dependencies, meaning dowloading a .tgz from github and unpacking it. If you want the source, install your vendors with
composer install --prefer-source
这会像你想要的那样做一个 git checkout.
This will do a git checkout like you want.
这篇关于Composer 没有为包生成 .git 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Composer 没有为包生成 .git 文件夹
基础教程推荐
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何替换eregi() 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
