我实质上是在尝试使用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.
更多推荐
将比特桶发布到数字海洋
发布评论