I'm hosting a version controlled folder to the internet; but switch to development branch could break service

huangapple go评论51阅读模式
英文:

I'm hosting a version controlled folder to the internet; but switch to development branch could break service

问题

我正在创建一个托管在网络上的服务。主分支拥有经过充分测试的代码,基本上对用户是安全的。

当我想要添加功能时,我需要切换到开发分支,这涉及到调整代码 - 这可能会破坏服务。

在确保测试过的代码对用户可用的同时,如何添加功能并测试更改

我尝试过使用两个不同的文件夹,但这似乎很繁琐。是否有工具可以帮助处理这个问题?

英文:

I'm creating a service hosted on the web. The master branch has well tested code that is by and large safe for users.

When I want to add features, I need to switch to the development branch, and this involves tweaking the code - an action that might break the service.

How can I add features and test for changes while making the tested code available to users.

I have tried using two different folders, but this seems tedious. Are there tools that help with this?

答案1

得分: 1

如果我理解正确,我担心你实际上想要知道的是如何在生产环境中访问/编写/运行开发代码,而不影响生产用户。

唯一的方法是将你的生产环境与开发和/或用户验收测试环境分离开来。

在Git层面上,可以通过设置两个独立的本地仓库来实现,一个用于运行生产服务,另一个用于自由试验。

你可以考虑一下Git Worktree,但不确定它是否能帮助你实现你的目标。

英文:

If I have understood correctly, I'm afraid what you're really asking is how to access/write/run development code in a production environment, without affecting production users.

The only way to do this is to separate out your production environment from a dev and/or UAT environment.

On a git level, this would be done by setting up two separate local repositories, one that your production service runs off, the other that you're free to play around in.

You may want to look at Git Worktree, but not sure if that will help you achieve your aim.

huangapple
  • 本文由 发表于 2023年6月15日 17:30:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76481090.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定