How do I use git to organize my development, approval, and production environment?

Asked

Viewed 2,098 times

8

We are adopting the use of an homologation server here in our company, but we still do not know how to organize the development flow from this paradigm, since currently each developer when he wants to consolidate the modifications implemented performs push or merge directly to origin/master, whether or not using a branch for this.

This relationship occurs only between the developer’s machine and the production server, which in turn has in each repository the respective script Hooks/post-receive for automated deployment to the directory /var/www.

Our new environment will work as shown below, where each square is a remote and each circle represents a branch fixed:

inserir a descrição da imagem aqui

I have not yet defined whether in the approval environment the design will be implemented from the branch test and in the origin (production) I will use only the branch master, or whether I will make this distinction only from remote, both projects are executed from the same branch master, because I don’t know the ideal solution in these cases. What do you suggest to me? How do you use with your teams?

1 answer

2

Here at work we have the master as the version "always deployable" according to the github flow, for each Feature we create a branch "correcao_xxx", after tested, a pull request is opened, analyzed, approved and integrated to master. Very simple. (of course, we use Github to facilitate this process).

Another possibility (which I find very interesting), is to create a branch that composes the current iteration changes (sprint, for example, a level below the master. ), I believe this can be considered your "development" branch, with new smaller branchs representing Features. After sprint, it integrates into the master (production branch) and closes the version (tag).

But it all depends on your need, a good way to think is to ask "does that make sense? when will I need this remote? and this branch?"

  • execelent suggestion. The company I work in, because I’m not in the software development business, has a more conservative culture, so in our case it is not possible to use Github to facilitate this process, however, it is very interesting to work with pull requests anyway. I also believe that adopting a different branch for homologation and another for production is the best alternative, although it is still necessary to work with different remotes, since we have two different servers for each situation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.