Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which files/directories to ignore in a Laravel 4 project when using version control?

I have a Laravel 4 project, and I would like to know which files should be ignored when using a version control software such as Git, Mercury or SVN?

The structure of my project looks like the following screen capture.

enter image description here

I'm pretty new to Composer so I'm not very clear about what goes to a repo what not. If someone can post their .gitignore file or their SVN ignore property, it could be handy.

like image 971
Rubens Mariuzzo Avatar asked Jun 08 '13 19:06

Rubens Mariuzzo


1 Answers

For reference, that .gitignore file can be found here:

/bootstrap/compiled.php /vendor composer.phar composer.lock  # Remove this one after you create a project .env.*.php .env.php .DS_Store Thumbs.db 

As noted in the below comment, you probably want to commit composer.lock in your project. Laravel ignores it by default so the authors of the laravel/laravel package don't accidently impose packages on you.

Your project should include the composer.lock file so you can install packages of stable versions (via composer install instead of composer update) properly in your production environments.

like image 72
fideloper Avatar answered Oct 17 '22 19:10

fideloper