And the only merges to the main branch come from approved merges on the stage branch. They are always branched from and merged to the stage branch. As in GitHub Flow, feature branches should encompass small, targeted changes. In this case, each deployment environment (prod & stage) is linked to a long-running branch in the repository. For the Terraform code, InfraEng uses a Simplified Git Flow model (which could also be seen as GitHub Flow on steroids). There is an exception to this for Infrastructure code. By the time you want to merge, the distance between your feature branch and main will usually mean a lot of conflict resolution in your future. When building a new code base this may not always be possible, but what you want to try and avoid are long running branches. Keeping your work focused will mean fewer merge conflicts. Ideally, feature branches should encompass small, targeted changes. Thoughtbot has some additional recommendations which should be followed. For small teams there is usually no need for anything more complicated than this. In most cases, GitHub flow will be the best choice for projects. Require status checks to pass before mergingĪllow merge commits ( Options > Merge button) Require pull request reviews before merging ![]() ( Branches > Protected branches)Įdit the protected branch and check these option settings: In the admin settings for repos on GitHub, the recommended settings are:ĭefault branch should be “main” ( Branches > Default branch)ĭisable force push to the main branch. Note: Terraform repos should only be created via the mitlib-tfc-mgmt repository (and this will take care of all of the appropriate admin settings as well as the integration with Terraform Cloud). There are probably more guidelines (e.g., some repo names should be recursive acronyms), but two is a good number to begin with. More specific to our work, there are a few guidelines for naming new reposĪll Terraform repo names start with mitlib-tf (to emphasize that these are MIT Libraries Terraform repositories)Īll repos that are local tweaks to generally available, pre-built Docker images should start with docker- (to indicate that this is a Docker image, not a MIT Libraries built/managed application) ![]() ![]() Naming is important (see There’s Power in Naming …).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |