如何通过git推送laravel软件包和帮助文件 [英] How to push laravel packages and helper files through git

查看:83
本文介绍了如何通过git推送laravel软件包和帮助文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我没有ssh访问权限,并且无法在服务器上运行composer命令.

If I don't have ssh access and can't run composer command over server.

如何通过GIT存储库正确上传laravel软件包,以便我的项目可以正常运行.

How can I upload laravel packages properly through GIT repository, so that my project will run without any problem .

我知道,如果我从根.gitignore删除供应商文件夹,则供应商文件将到达服务器.

I know If I remove vendor folder from root .gitignore then vendor file will up to the server.

但是我仍然有疑问,我也必须做其他思考.

But still I have doubt, I have to do other thinks also.

我的git不好,这就是为什么在弄乱laravel之前我要问这个问题.

I am not good in git thats why before messing laravel I am asking this.

推荐答案

一般建议不要提交vendor目录,这就是Laravel附带.gitignore文件的原因,其中该文件包含vendor目录

The general recommendation is not to commit the vendor directory, that's why Laravel ships with a .gitignore file that contains the vendor directory amongst other things.

但是,在您这样的情况下,这是不可能的,因此在这种情况下, Composer文档提供有关如何处理将依赖项提交到版本控制的一些建议:

However, there are situations such as yours where this is not possible, so in that case there is a nice section of the Composer Documentation that offers some advice on how you should handle committing the dependencies to version control:

我应该提交我的供应商目录中的依赖项?

这篇关于如何通过git推送laravel软件包和帮助文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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