git - 带有 Laravel Sail 和版本控制的 Laravel 8 开发项目

标签 git windows-subsystem-for-linux laravel-8 laravel-sail

我正在学习 Laravel 8,我想使用 Laravel Sail 设置一个快速开发环境。
由于我们通常不会提交到 Git 中的供应商目录,我们如何从一个新的 Git 克隆运行 Sail?没有它我们就不能使用“composer install”。这是否意味着我们应该提交 vendor/bin 和 vendor/composer 文件夹?有哪些常见的做法?
我们是否应该将/vendor/bin 提交到 git 以获得开箱即用的新开发环境?

最佳答案

我偶然发现了完全相同的问题。
在文档中有以下部分解决了这个问题:

You may install the application's dependencies by navigating to the application's directory and executing the following command. This command uses a small Docker container containing PHP and Composer to install the application's dependencies:

docker run --rm \
    -v $(pwd):/opt \
    -w /opt \
    laravelsail/php80-composer:latest \
    composer install
https://laravel.com/docs/8.x/sail#installing-composer-dependencies-for-existing-projects
当然,您还必须准备 .env-File 和其他未提交的依赖项。

关于git - 带有 Laravel Sail 和版本控制的 Laravel 8 开发项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65718159/

相关文章:

git 服务器的主机 key 未缓存在注册表中

python - 问题涉及WSL、Gunicorn、Docker和Flask

windows-subsystem-for-linux - 全新安装后无法使用 tlmgr,tlmgr : Local TeX Live (2021) is older than remote repository (2022)

php - 使用 Laravel Mix 编译时出错 - Vue

php - Laravel sainttum 检查用户是否经过身份验证

laravel - 我做了订单管理系统,如何在laravel中合计价格?

git - 将 git 移动到更高的文件夹?

Git:如何查看文件的旧版本(在将其添加到暂存区/索引之前)?

git - 如何从分支中提取最新的代码副本?

python - 脚本是否可以打开 WSL bash shell 并向其发送命令?