[英]Git workflow for development in a shared environment
I am trying to figure out the best git branch model and workflow for our case. 我试图找出适合我们案例的最佳git分支模型和工作流程。 We have a pretty special setting: developers don't have a local environment, all use the same shared environment.
我们有一个非常特殊的设置:开发人员没有本地环境,所有人都使用相同的共享环境。
Since our environment difficult to replicate, we use a shared environment for development. 由于我们的环境难以复制,因此我们使用共享环境进行开发。 Modifications are uploaded to this shared environment to be executed and evaluated.
修改将上传到此共享环境以执行和评估。
However, sometimes developers step on other's toes by updating the same file separately and causing other people's work being overwritten. 但是,有时开发人员通过单独更新同一文件并导致其他人的工作被覆盖而踩在别人的脚上。
We have also an staging and production environment used for our testing and release process. 我们还有一个用于测试和发布过程的暂存和生产环境。
Does anybody know a git branching model that could fit our setting? 有人知道适合我们设置的git分支模型吗?
I have been in your shoes. 我去过你的鞋子。 I assume you mean that you use a shared working directory where your code (scripts?) lives and is in use by your webserver or whatever, and everyone is accessing that (ie, the running code is your single shared working space at the same time)
我假设您的意思是您使用共享的工作目录 ,其中的代码(脚本?)位于其中,并且由Web服务器或其他任何设备使用,并且每个人都在访问该目录(即, 正在运行的代码同时是您的单个共享工作空间) )
One model would be: 一种模型是:
git add ; git commit
git add ; git commit
git add ; git commit
in that directory. git add ; git commit
在该目录中。 git pull ; git checkout xyz-branch
git pull ; git checkout xyz-branch
git pull ; git checkout xyz-branch
in that directory. git pull ; git checkout xyz-branch
在该目录中。 It is for purposes of this relatively inconsequential which branching regime you use. master
". master
人员一个分支”。 But it would really be wise to take the effort to get rid of the shared working directory on your development environment, and try hard to give each developer his own. 但是,尽力摆脱开发环境上的共享工作目录,并尽力为每个开发人员提供自己的目录确实是明智的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.