Skip to main content

How to use Git

Git flow

When to choose

We use this branching system, based on git flow if we don't need an additional code review by an expert member of the team. Usually, this is the best branching system if the project is handled by one or few developers

Reference

This flow is best described here: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

Additional notes

The process should be the following:

  • A new feature branch is mandatory to create for each ticket in progress. Branch name should at least start from the ticket key. For instance #35498159-orderlist-sorting
  • Once the feature is done and tested, changes are merged in the develop branch.
  • When a develop branch contains all needed for staging, create a release branch and deploy to the STAGING environment.
  • Once the STAGING environment is tested, the release branch can be merged into main and can be deployed to the PROD environment.

Git feature branch workflow

When to choose

We use this branching system, based on pull requests and code review only if we have more technical team member that is empowered to review code.

Reference

This flow is best described here: https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow

Additional notes

The process should be the following:

  • A new branch is mandatory to create for each ticket in progress. Branch name should at least start from the ticket key. For instance, #35498159-orderlist-sorting
  • Once the work is done and tested, a new pull request (PR) should be created and reviewed by other team members that have expertise in the tech stack. If no one can review the PR it should be created anyway to keep the history of the changes merged.
  • If a ticket branch is reviewed it can be merged to the develop branch.
  • When a develop branch contains all needed for production release changes it can be merged to main branch. This merge will trigger auto deploy to the STAGING environment.
  • Once the STAGING environment is tested the build can be deployed to the PROD environment. The recommended by still optional way is to use tags for each prod environment.