User Tools

Site Tools


11 Gitflow Workflow

gitflow is a branching model for git created by Vincent Driessen. It forms an elegant mental model that is easy to comprehend and allows team members to develop a shared understanding of branching and releasing processes.

Detailed information can be found on A successful git branching model.

The Git Tower team wrote another detailed description on how to use gitflow with a GUI tool.

Basic usage and effect of git-flow operations on the command line:

In a nutshell:

  • use different branches for different purposes
  • master holds only releases (and bugfixes)
  • develop holds the latest version under development
    • only tested features are merged into develop
  • all features are developed in single, separate branches called feature/xxx
    • these feature branches are merged back into develop after the feature is finished and tested

Guidelines for gitflow

  1. Create meaningful feature branch names and add your name (or initials) to the branch for easy identification - see branching rules for details
  2. Each developer should work on no more than one feature branch at any time
  3. Keep your feature branch synced with develop (as often as possible) to avoid drifting from main code (git pull develop)
    1. i.e. merge develop back into your feature branch
  4. Close your feature branches as soon as the work is finished, not after days when some details are already forgotten. This helps to keep history more readable.
  5. Merge the develop branch into your feature branch before finishing it. That way, you can solve any conflicts in your local workspace without breaking anything for the rest of the team.
kb/bestpractices/scc/gitflow-workflow.txt · Last modified: 2020/09/30 15:28 by joerg.hampel