A Git Workflow is a recipe or recommendation for how to use Git to accomplish work in a consistent and productive manner

Some things to consider when evaluating a Git workflow are:

  • Does this workflow scale with team size?
  • Is it easy to undo mistakes and errors with this workflow?
  • Does this workflow impose any new unnecessary cognitive overhead to the team?

Workflows - Branch Management Policies/Patterns/Schemes

Type

Description

Centralized Workflow

  • there is a single branch namedmaster where everyone syncs up to

Feature Branch Workflow

  • is a logical extension of Centralized Workflow
  • the core idea is that all feature development should take place in a dedicated branch instead of the master branch. This encapsulation makes it easy for multiple developers to work on a particular feature without disturbing the main codebase. It also means the master branch should never contain broken code, which is a huge advantage for continuous integration environments

Gitflow Workflow

GitHub Flow

Trunk-Based Development

Simple Flow

Forking Workflow

  • is fundamentally different than the other workflows
  • instead of using a single server-side repository to act as the “central” codebase, it gives every developer a server-side repository. This means that each contributor has not one, but two repositories: a private local one and a public server-side one

Resources