composer install package:dev-mas
2016-11-20 本文已影响285人
龙权
比如这个包:
composer require "thetispro/laravel5-setting:dev-master"
装了后 vendor/thetispro/laravel5-setting
目录下会有 .git
目录, 包含了作者的 git
信息, 这时候可能会跟我们自己的 git
出现冲突
解决办法, 利用 composer 自带的钩子解决
{
...
"post-install-cmd": [
"echo '[WARNING] Delete vendor all git dirs'",
"rm -rf vendor/**/**/.git",
...
]
"post-update-cmd": [
"echo '[WARNING] Delete vendor all git dirs'",
"rm -rf vendor/**/**/.git",
...
]
...
}