Git方面的笔试题目(翻译并给出正确答案)

peter20091001 2017-04-19 10:06:33
Which is the best way to automatically deploy a PHP website using git push?
It is not possible.
You should have two copies on your server. A bare copy, that you can push/pull from, to which you would push your changes to when you are done. Then you would clone this into your web directory and set up a cronjob to update git pull from your web directory every day or couple of days.
Developing from scratch a custom deployment script to manage all the aspects.
(a)Copy over your git directory to your web server.
(b)On your local copy, modify your .git/config file and add your web server as a remote.
(c)On the server, replace .git/hooks/post-update with an existing script to process the rest of the workflow.
(d)Make the script executable.
我是这样翻译的:
使用git push自动部署PHP网站,哪种方法最好?
It is not possible.
服务器上有两个副本。 一个是空的版本库,你可以向它推送, to which you would push your changes to when you are done. 然后将它克隆到你的Web目录,并建立一个计划任务,若干天从Web目录上拉取更新。
从头开始开发一个自定义部署脚本管理的所有方面。
有人能给我解释下这段话的意思吗?
...全文
201 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

4,164

社区成员

发帖
与我相关
我的任务
社区描述
Windows专区 一般软件使用
社区管理员
  • 一般软件使用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧