本文介绍了将比特桶发布到数字海洋的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实质上是在尝试使用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.

这篇关于将比特桶发布到数字海洋的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 02:21
查看更多