我确实配置了一个bitbucket存储库composer.json,但是composer正在使用git文件夹克隆整个存储库及其分支。
我怎样才能获得选定的分支?
{
"repositories": [
{
"type": "package",
"package": {
"name": "greenweb/framework",
"source": {
"url": "https://bitbucket.org/my_team/my_framework.git",
"type": "git",
"reference": "origin/develop"
},
"version": "1.0.0"
}
}
],
"require": {
"php": ">=5.4.0",
"greenweb/framework": "*"
}
}
答案 0 :(得分:1)
调整composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org/my_team/my_framework.git"
}
],
"require": {
"php": ">=5.4.0",
"greenweb/framework": "dev-develop"
}
}
然后运行:
$ composer install
供参考,请参阅https://getcomposer.org/doc/05-repositories.md#using-private-repositories。