Code versioning

Every developer needs some version control and we decided to use Git for that purpose. Here you can find some description of some best bractices or workflows we are trying to keep when using it.

Topics

Branching model

There are several standard git workflows, and we use two of them: Git flow and feature branch workflow. Which one we use depends on what we are developing.

Git flow workflow

That is a workflow we use when developing applications. There are always at least two persistent branches master and develop (development) as shown in the picture. Most time there is also stage branch that represents middle phase between master and development.

All mentioned branches (master, development, stage) represents environment for deployment.

  • development - we use it when developing application, every new feature or bug fix (not urgent) is first merged into development branch which is then deployed to development environment and tested if it works.
  • stage - when project manager decides that developed features or fixed bugs are ready to be tested by a customer, developer deploy them to the stage environment where customer can test them. That is accomplished by merging the development branch to the stage branch.
  • master - when new features, bug fixes are approved by testers (development) and customer (stage) they are ready to merge to master branch and deploy to production environemnt.
    Be aware that for master branch unlike for development, deploy is usually not started automatically and you need to start it manually.

Git flow workflow
Image taken from https://buddy.works/blog/5-types-of-git-workflows

You can find more about the workflow at external resources below:

Feature branch workflow

That is a workflow we use when developing libraries (see tools we cook). We found it more effecient than Git flow as there is usually no development version hold for some time and when new feature is finished, it's required to release immediately.

In short there is only one persistent branch called master, all other branches (feature, release, hotfix, etc.) are temporary, exists only for a neccesary time and are supossed to delete afterwards.

Feature branch workflow
Image taken from https://buddy.works/blog/5-types-of-git-workflows

You can find more about the workflow at external resources below:

results matching ""

    No results matching ""