Git“实时服务器"最佳实践 [英] Git "Live Server" Best Practices

查看:69
本文介绍了Git“实时服务器"最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的合伙人一直想着从回购中推送和拉回的想法,这会影响普通公众可见的文件,而不是将回购存储在隐藏的位置,而当我们认为它们适合时只是通过FTP传输文件去.虽然能够直接推送到活动站点"将是非常方便的,但我想知道这会产生什么负面影响(如果有).

My partner and I have been dabbling with the idea of pushing and pulling from a repo that affects files viewable by the general public as opposed to storing the repos in a hidden location and just FTPing files when we feel they're good to go. While being able to directly push to the "live site" would be extremely convenient, I'm wondering what negative repercussions (if any) this would incur.

非常感谢!

推荐答案

如果走这条路线,我建议拉而不是推.

I would recommend pulling rather than pushing if going this route.

始终拉出成品,并且不要在实时服务器上进行合并,因为如果发生冲突,您将争着解决它们.在测试环境中进行所有合并等.一旦一切就绪,将完成的结果推送到生产分支的裸机"存储库,然后从生产机器git pull推送到该仓库.

Always pull the finished product and do not do merges on the live server, for if there are conflicts you will be scrambling to fix them. Do all your merging, etc on your testing environment. Once all is good there, push the finished results to your 'bare' repo for the production branch and then from the production machine git pull from it.

是的,这可能是另一个失败点,但是我认为好处远大于缺点.

Yes it could be another point of failure however I think the benefits outway the cons.

这篇关于Git“实时服务器"最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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