Git & GitHub Mastery: Workflows & CI/CD
Back to GitHub & Collaboration

Branching Strategies (Trunk, GitFlow, GitHub Flow)

The three main models. How they shape your team's workflow, and which fits your situation. FIND_VIDEO: search 'branching strategy trunk gitflow github flow' — recommended channel: Atlassian / Continuous Delivery Foundation. Aim for 10 min or under.

10 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Necessity of Strategies — Formal strategies are required because raw Git commands are insufficient for effective team collaboration.
  2. Feature Branch Workflow — Defines the core lifecycle of isolating work in short-lived branches off the stable `main` branch.
  3. Feature Branch Implementation — Demonstrates the practical sequence of commands to create a branch and make isolated commits.
  4. Merging and Cleanup — Shows the critical steps of switching to the target branch, merging, and deleting the source branch.
  5. GitFlow Overview — Explains the rigid, multi-branch model suitable for projects with strict versioning requirements.
  6. GitHub Flow Overview — Outlines the simple, CD-focused model where `main` is always deployable upon merge.
PDF notes

Frequently asked questions

What is the difference between `main` and `develop` in GitFlow?

`main` holds only production code tagged with versions, while `develop` is the integration branch for the next release cycle.

Why is "Main is Always Deployable" so important in GitHub Flow?

This rule enforces strict CI/CD discipline, allowing every merge to trigger an immediate, safe deployment to production.

What is the purpose of deleting a feature branch after merging?

Deleting the branch reduces repository clutter and ensures that the branch cannot accidentally be reused for new, unrelated work.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.