learn-terraform

Course outlines for learning terraform.

View the Project on GitHub robertdebock/learn-terraform

Git strategy

expected time requirements
30 minutes Not a lot.

Goal: Discuss the different git strategies.

Explanation

There are many ways to work with Git. Let’s discuss a few.

One branch

This strategy tries to get all development back to a single branch, say main or master. There can be extra branches that hold active development efforts, but the intent is to bring those changes back to the default branch.

On succesful integration into the default branch, a new version is released. This basically means the released version is expected to work.

                              +--- version: 1.2.3
                             /
----+------ (master) -------+----
     \                     /
      +--- (my_branch) ---+

Benefits

Drawbacks

Multiple branches

This strategy requires a bit more maintenance; there will be multiple branches, maybe an environment will use a specific branch.

---+--- (development) ---
    \
     +--- (test) ---
      \
       +--- (acceptance) ---
        \
         +--- (production) ---

In this strategy, experiments happen in development. Once working, a merge can be done to test. When that’s working, a merge can be done to acceptance and so on.

This means production is last in line.

There can be (and likely are) multiple branches before development.

Benefits

Drawbacks

Assignment

Questions:

  1. For yourself/colleagues/company, what is the best strategy?