0Pricing
DevOps Bootcamp · Lesson

Gitflow Workflow Introduction

Discover the structured Gitflow model with its main, develop, feature, release, and hotfix branches.

Gitflow Workflow Introduction is a free DevOps Bootcamp lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Welcome to Gitflow

Ever wondered how large teams manage their Git repositories for structured releases and seamless collaboration?

The Gitflow Workflow is a popular branching model designed to help teams do just that. It provides a robust framework for managing projects with distinct development phases and frequent releases.

The Core Branches

Gitflow introduces two main, long-lived branches:

  • main (sometimes called master): This branch always reflects a production-ready state. Every commit here should be stable and deployable.
  • develop: This branch is where all development efforts are integrated. New features are merged here, forming the basis for the next release.

Setting up 'develop'

To start with Gitflow, you typically create the develop branch from main. This sets up your primary development line.

Let's create and switch to our develop branch:

git branch develop
git checkout develop

Feature Branches

When you start working on a new feature, you create a feature branch. These are temporary branches that help isolate your work until it's complete.

Feature branches are always created from the develop branch.

git checkout develop
git checkout -b feature/user-profile

Working on a Feature

You develop your new functionality within the feature/user-profile branch. Once the feature is complete and tested, it's merged back into develop.

Here's how you might commit your work:

git add .
git commit -m "Add user profile page"

Integrating Your Feature

After completing your feature, you merge it into develop. This integrates the new functionality into the main development line, ready for the next release cycle.

And then you can delete the feature branch.

git checkout develop
git merge feature/user-profile --no-ff
git branch -d feature/user-profile

Release Branches

When develop has enough features for an upcoming release, a release branch is created from develop. This branch is for final preparations, bug fixes, and last-minute tweaks.

No new features are added here!

git checkout develop
git checkout -b release/1.0.0

Finalizing a Release

Once the release branch is stable, it's merged into two places:

  • main: To mark the official release. A version tag (e.g., v1.0.0) is also applied here.
  • develop: To ensure all release-specific bug fixes are carried forward into future development.
git checkout main
git merge release/1.0.0
git tag -a v1.0.0 -m "Release version 1.0.0"
git checkout develop
git merge release/1.0.0
git branch -d release/1.0.0

Hotfix Branches

What if a critical bug is found in production (on main)? You use a hotfix branch to quickly address it.

Hotfix branches are created directly from main, fixed, and then merged back into both main (with a new tag) and develop.

git checkout main
git checkout -b hotfix/critical-bug-fix
# ... fix bug and commit ...
git checkout main
git merge hotfix/critical-bug-fix
git tag -a v1.0.1 -m "Hotfix for critical bug"
git checkout develop
git merge hotfix/critical-bug-fix
git branch -d hotfix/critical-bug-fix

Gitflow Branch Roles

Let's check your understanding of the different branches in the Gitflow workflow.

Gitflow Workflow Recap

You've learned about the Gitflow workflow!

  • main: Production-ready code.
  • develop: Integration branch for new features.
  • feature: For developing new features, branched from develop.
  • release: For preparing a new release, branched from develop.
  • hotfix: For urgent production bug fixes, branched from main.

This structured approach helps teams manage complex development cycles more effectively.

Frequently asked questions

Is the “Gitflow Workflow Introduction” lesson free?

Yes — the full text of “Gitflow Workflow Introduction” is free to read here on the web, and the DevOps Bootcamp course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the DevOps Bootcamp course, upgrade to CoddyKit PRO.

What will I learn in “Gitflow Workflow Introduction”?

Discover the structured Gitflow model with its main, develop, feature, release, and hotfix branches. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Gitflow Workflow Introduction” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Feature Branch Workflow
  2. Gitflow Workflow Introduction
  3. Rebasing vs. Merging
  4. Trunk-Based Development
← Back to DevOps Bootcamp