版本控制laravel。我应该忽略哪些文件?

时间:2016-08-05 23:19:26

标签: git version-control laravel-5

当版本使用git控制laravel 5 app时,我应该忽略哪些文件?

最终我明白应该忽略node_modules和供应商文件夹,而composer.lock则不应该。我从看到有关laravel 4 VC的评论中得到了一般的要点,但是在我第一次提交之前我想知道,如果还有其他文件我应该添加到我的git中吗?< / p>

1 个答案:

答案 0 :(得分:5)

According to GitHub

vendor/
node_modules/

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

# Laravel 5 & Lumen specific
bootstrap/cache/
.env.*.php
.env.php
.env

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

Joe为Laravel和Composer推荐这个:

#### joe made this: http://goel.io/joe

#####=== Laravel ===#####

/bootstrap/compiled.php
.env.*.php
.env.php
.env

#####=== Composer ===#####

composer.phar
vendor/

# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock