Git & GitHub Course
Git & GitHub
/
Advanced

GitFlow

Definition

A strict Git branching model that involves the use of two long-running branches (`master` and `develop`) and multiple short-lived branches (`feature`, `release`, `hotfix`).

Explain Like I'm New

An older, very rigid set of rules for managing massive software releases. You never touch `master`. You do all your work on `develop`. When `develop` is ready, you branch into `release`, test it for a week, and then finally merge it into `master`.

Real World Example

Used by companies that release software on a strict schedule, like video game studios releasing 'Version 1.0', 'Version 1.1', etc.

Common Use Cases

  • •Enterprise software releases
  • •Apps with strict versioning

Terminal Output

bash / terminal
// The GitFlow Workflow Pattern: /* [master] (v1.0) ---------------------------------------> [master] (v1.1) \ / [develop] ---> [feature-A] ---> [develop] --/ */

Interview Questions

basic

  • What two permanent branches exist in GitFlow?

intermediate

  • Why has GitFlow fallen out of favor in modern web development?

Flash Cards

Question

Two permanent branches?

Click to reveal answer
Answer

`master` (production-ready code only) and `develop` (the active integration branch).

Question

Why fallen out of favor?

Click to reveal answer
Answer

It is too complex and slow. Modern web apps deploy multiple times a day using 'Continuous Deployment'. Maintaining a rigid `develop` and `release` branch adds unnecessary bureaucratic overhead.