比如這個(gè)包:
composer require "thetispro/laravel5-setting:dev-master"
裝了后 vendor/thetispro/laravel5-setting
目錄下會(huì)有 .git
目錄, 包含了作者的 git
信息, 這時(shí)候可能會(huì)跟我們自己的 git
出現(xiàn)沖突
解決辦法, 利用 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",
...
]
...
}