当您与团队合作时,这个 .gitignore laravel 有意义吗?

Does this .gitignore laravel makes sense when you're working with a team?

我 2 天前开始使用 Github,它在私有存储库中。

所以我和我的朋友(我任命他为协作者)一起工作一个项目,但是当你们与团队一起工作时,.gitignore 文件的最佳设置是什么?
因为我在想,如果 Github 忽略诸如 .env(应用程序密钥)和 /vendor 之类的文件,程序将无法正常运行?

现在我使用 .gitignore 个文件的默认设置。

/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env

请帮忙,我已经搜索过了,但找不到答案。

从推荐表入手更容易gitignore.io
参见 gitignore.io/api/laravel

Laravel

/供应商 node_modules/ npm-debug.log

# Laravel 4 specific
bootstrap/compiled.php
app/storage/

# Laravel 5 & Lumen specific
public/storage
public/hot
storage/*.key
.env.*.php
.env.php
.env
Homestead.yaml
Homestead.json

# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/

请注意,忽略 文件夹 应指定为 aFolder/,并带有尾部斜杠。

任何包含 生成的 内容的文件夹都应被忽略。
如果 vendor/ *未生成(但包含您需要编译的源代码),那么您应该 而不是 忽略它。