将比特桶发布到数字海洋

编程入门 行业动态 更新时间:2024-10-14 20:24:33
本文介绍了将比特桶发布到数字海洋的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我实质上是在尝试使用bitbucket了解git的概念;我一直在通过修改本地帐户和Bitbucket帐户之间的文件来练习版本控制,这被证明是有帮助的.

I'm essentially trying to understand the concept of git using bitbucket; I've been practicing version control by modifying files between my local and bitbucket accounts which has proven helpful.

现在,我正在尝试弄清如何将文件从Bitbucket(或我想的GitHub之类)中的远程回购推送到数字海洋之类的云托管解决方案.甚至推荐吗?我真的不能用Google搜索它,因为结果以我的意思是Bitbucket服务器,或者想在Bitbucket本身上托管网站而出现.我不确定您是否会要求Digital Ocean来提取"文件,或者Bitbucket中有一些选项可以进行远程推送和中间操作.

Now I'm trying to work out how you would push the files from a remote repo in bitbucket (or i guess GitHub or the like) to a cloud hosting solution such as digital ocean. Is that even recommended? I can't really google it because result come up as thinking I mean the bitbucket server, or want to host a site on bitbucket itself. I'm not sure if you would ask digital ocean to 'fetch' the files, or there is options within Bitbucket to push remotely and act intermediately.

推荐答案

您可以在.git\hooks中使用接收后挂钩.接收后的内容应为:

You can use post-receive hook in .git\hooks. The content of post-receive should be:

#!/bin/sh git --work-tree=/droplet/repo --git-dir=/bitbucket/repo checkout -f

现在,将更改推送到位桶后,它将重新部署到小滴.

Now after you push changes to bitbucket, it will redeploy to droplet.

更多细节,您可以参考此处.

More detail, you can refer here.

更多推荐

将比特桶发布到数字海洋

本文发布于:2023-10-28 04:04:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535460.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:海洋   数字

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!