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?

我的项目 struct 如下图所示.

enter image description here

我对Composer岁还很陌生,所以我不太清楚什么是回购,什么不是.如果有人可以发布他们的.gitignore文件或他们的SVN ignore属性,这可能很方便.

推荐答案

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.

Laravel相关问答推荐

Inertia React中的错误文件上传更新

未将Laravel Blade属性传递给组件或类

自定义验证在表单请求上始终返回 true laravel

根据路径的开头重定向

如何通过 Controller 访问 Laravel 中 Model 的值?

Laravel created_at 返回对象代替数据库中的日期格式?

安卓 retrofit |发布自定义对象(将 json 发送到服务器)

Laravel 5表单请求验证返回禁止错误

如何更改 Laravel5 中的视图文件夹?

PHP 中的 Http 响应代码枚举

Laravel 在特定文件夹中创建迁移文件

Laravel assets资源与混合

如何在 Laravel 视图中找到当前语言?

Laravel php artisan 服务于模仿 HTTPS

Laravel 隐藏属性.例如密码 - 安全

Laravel 表:只能有一个自动列,并且必须定义为键

如何在laravel中获取列值的平均值

使用 Queue::fake() 测试监听器

Laravel 4 - 一个表单中有两个提交按钮,并且两个提交都由不同的操作处理

在哪里放置 Blade::extend