在这个工作流程中,是否需要在生产服务器上安装git命令? [英] On this workflow, does git command needs to be installed on the production server?

查看:177
本文介绍了在这个工作流程中,是否需要在生产服务器上安装git命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发者B - 本地仓库 - >拉/推 - > github
  • push ---> github


  • Capistrano会留在我们开发人员的机器上,但是我们b $ b会定义:repository来指向我们的GitHub项目:
    set:repository,git@github.com:myuser / myproject.git#我的克隆url


  • 开发人员A或开发人员B必须允许将提交的文件部署到生产机器。


    问题1)

    这些提交的文件将会出现来自其中一个开发人员的机器,是否正确?

    问题2)

    此程序是否要求我的共享主机有没有git命令的支持,或者没有?



    非常感谢。

    解决方案
    http://rubydoc.info/gems/capistrano/2.5.19/Capistrano/Deploy/Strategy/Copy



    2)取决于你最终做了什么,使用从github提取代码的默认策略,你需要安装git,如果你使用上面链接的复制策略,你就不会这样。


    • Developer A - Local Repository --> pulls/push ---> github
    • Developer B - Local Repository --> pulls/push ---> github

    • Capistrano would remain on our developers' machines, however we will define :repository to point to our GitHub project: set :repository, "git@github.com:myuser/myproject.git" # My clone url

    • Developer A OR Developer B must be allowed to deploy committed files to the production machine.

    Question 1)
    Those committed files will come from one of the Developers machines, correct?

    Question 2)
    Will this procedure require that my shared host HAS do have git command support, or not?

    Thanks a lot.

    解决方案

    1) By default Capistrano will deploy from the repository, so the files getting deployed would come from the code that is checked into github. You can configure Capistrano to deploy it from the developers local machine by using a different "deployment strategy" See here: http://rubydoc.info/gems/capistrano/2.5.19/Capistrano/Deploy/Strategy/Copy

    2) Depends on what you end up doing, using the default strategy that pulls code from github, you will need git installed, if you use the Copy Strategy linked above, you would not.

    这篇关于在这个工作流程中,是否需要在生产服务器上安装git命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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