Git Advanced: Git workflow to manage work on multiple branches

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


I track all my development using Git, and I always follow this strategy.

The strategy is inspired by A successful Git branching model.

I have 2 permanent branches: master and develop.

Those are the rules I follow in my daily routine:

When I take on a new issue, or decide to incorporate a feature, there are 2 main roads:

  • The feature is a quick one, or subsequent commits I’ll make won’t break the code (or at least I hope so): I can commit on develop, or do a quick feature branch, and then merge it to develop.

  • The feature will take more than one commit to finish, maybe it will take days of commits before the feature is finished and it gets stable again: I do a feature branch, then merge to develop.


If something on our production server requires immediate action, like a bugfix I need to get solved ASAP, I do a short hotfix branch, fix the thing, test the branch locally and on a test machine, then merge it to master and develop.


If I need a quick feature/edit to be pushed on the production server, the develop branch has some unstable code in it, and I’d like that feature/edit ASAP, I can skip the develop branch, do a quick feature branch and merge it to both master and develop, as long as the feature/edit is fast and trivial. If it proves to be something more complicated down the road, it’d be better to wait and stabilise the code on the develop branch.


The develop branch will always be in a state of flux, that’s why it should be put on a ‘freeze’ when preparing a release. The code is tested and every workflow is checked to verify code quality, and it’s prepared for a merge into master.


Every time develop or another hotfix branch is merged into master, I tag it with a version number, so it’s easy to move back to a previous state if something goes wrong.

Lessons in this unit:

0: Introduction
1: Working with Remotes
2: Squashing Commits
3: Rebase vs Merge
4: Git Bisect for Debugging
5: Git Worktrees
6: Git Submodules
7: Understanding Detached HEAD
8: Managing Secrets in Git
9: Git Workflows and Best Practices
10: How to push to 2 repositories at the same time and keep them in sync
11: How to update a Git branch from another branch
12: Git, detached HEAD
13: Trigger deploys on Netlify with submodules
14: A Git Cheat Sheet
15: Git, squashing vs not squashing
16: An incomplete list of great Git tutorials
17: Git, what if you forgot to add a file to a commit?
18: ▶︎ Git workflow to manage work on multiple branches
19: How to setup the Git SSH keys