Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version controlling laravel. Which files should i ignore?

When version controlling a laravel 5 app with git, which files should I be ignoring?

Ultimately I understand that node_modules and vendor folders should be ignored, and composer.lock should not. I have got the general gist of that from seeing comments relating to laravel 4 VC, but I'm wondering before I make my first commit, if there's any other files I should be adding to my git ignore?

like image 581
James mcconnon Avatar asked Aug 05 '16 23:08

James mcconnon


Video Answer


1 Answers

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/

And Joe recommends this for Laravel and 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
like image 128
Chris Avatar answered Oct 28 '22 15:10

Chris