Laravel 为什么git从外部分支拉入我在/vendor目录中遇到了几个冲突错误
从外部分支拉入Laravel 5应用程序时,我遇到了几个冲突错误,如Laravel 为什么git从外部分支拉入我在/vendor目录中遇到了几个冲突错误,laravel,git,Laravel,Git,从外部分支拉入Laravel 5应用程序时,我遇到了几个冲突错误,如 error: refusing to lose untracked file at 'vendor/composer/autoload_static.php'
error: refusing to lose untracked file at 'vendor/composer/autoload_static.php'
CONFLICT (modify/delete): vendor/composer/autoload_real.php deleted in HEAD and modified in b871903544566b6c1fd662ac67e7987f1ecc8643. Version b871903544566b6c1fd662ac67e7987f1ecc8643 of vendor/composer/autoload_real.php left in tree.
但在.gitignore文件中,我有供应商目录:
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
.env
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
composer.lock
package-lock.json
1.txt
我想知道为什么会出现这样的错误,以及如何修复它们?
我想手动编辑/vendor中的文件是没有意义的
谢谢 这不是一个普通的供应商软件包,它是由composer生成的自动加载 运行此命令重新生成文件以修复错误
compser dump autoload
但您真正应该做的是从git中删除自动加载:
- 删除跟踪的文件并提交更改
- 将其添加到忽略列表(应已忽略)
- 推
- 拉动后,每次安装时运行命令
dump autoload