使用版本控制时,在Laravel 4项目中要忽略哪些文件/目录? [英] Which files/directories to ignore in a Laravel 4 project when using version control?

查看:205
本文介绍了使用版本控制时,在Laravel 4项目中要忽略哪些文件/目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Laravel 4项目,我想知道使用版本时应忽略哪些文件控制软件,如Git,Mercury或SVN?

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.

对于作曲家来说,我还很陌生,所以我对回购的内容不甚了解.如果有人可以发布他们的.gitignore文件或他们的SVN忽略属性,那将很方便.

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.

推荐答案

作为参考,可以在.gitignore文件. gitignore"rel =" noreferrer>此处:

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

如下面的注释中所述,您可能想在项目中提交composer.lock. Laravel默认情况下会忽略它,因此laravel/laravel软件包的作者不会偶然将软件包强加于您.

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.

您的项目应包含composer.lock文件,以便您可以在生产环境中正确安装稳定版本的软件包(通过composer install而不是composer update).

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 4项目中要忽略哪些文件/目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆