GitFlow Hotfix — Bug Reappears After Skipping Develop Merge
A hotfix to main but not develop reintroduced the same bug in v1.1.0; 6 hours wasted.
20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.
- ✓Solid grasp of DevOps fundamentals
- ✓Comfortable with command-line tools
- ✓Basic Linux administration knowledge
- main: production-ready, tagged releases only — receives merges from release or hotfix
- develop: integration branch — feature branches merge here when complete
- feature/*: cut from develop, merge back to develop — isolated feature work
- release/*: cut from develop, merge to main AND develop — stabilisation window
- hotfix/*: cut from main, merge to main AND develop — emergency production fixes
Git tags are immutable pointers to specific commits, designed for marking release points (v1.2.3) or significant milestones. Unlike branches, tags don't move when new commits are added — they're permanent labels. Releases are the packaged artifacts (binaries, tarballs, Docker images) associated with those tags, typically published to registries like GitHub Releases, GitLab Releases, or artifact repositories.
The core distinction: tags are metadata in your Git history; releases are the deployable units your ops team actually pushes to production. When you skip merging a hotfix back into develop, you're not just breaking workflow convention — you're creating a time bomb where the next release will reintroduce the bug because the fix never reached the integration branch.
This is why GitFlow mandates the hotfix→develop merge: without it, your release tags become unreliable snapshots of what's actually fixed.
Imagine a busy restaurant kitchen. There's a prep area where chefs experiment with new dishes, a staging area where meals are plated and checked before leaving the kitchen, and the pass where only perfect plates go out to customers. GitFlow is exactly that system — but for your codebase. Every new feature gets its own prep space, nothing reaches production until it's been checked in staging, and if something goes wrong with a dish already at the table, there's a dedicated rescue process that doesn't halt the whole kitchen.
GitFlow is a branching model with five branch types that enforce separation between development, stabilisation, and production. Each branch type has a strict source and destination — feature branches from develop, release branches to main and develop, hotfix branches from main to both main and develop.
The model solves a specific problem: teams with scheduled, versioned releases that need a stabilisation window between development and production. It is not suited for teams deploying multiple times per day — trunk-based development with feature flags is better for that cadence.
Common misconceptions: that GitFlow is the only correct branching strategy (it is one option among several), that the git-flow CLI is required (it automates plain Git commands), and that hotfix branches only need to merge to main (they must also merge to develop or the bug reappears in the next release).
What Are Git Tags — The Fundamentals
A Git tag is a named reference to a specific commit, typically used to mark release points (v1.0.0, v2.3.1). Unlike branches, tags do not move — they permanently point to one commit.
Two types of tags: - Lightweight tags — Just a pointer to a commit. Like a branch that never moves. Created with git tag <name>. - Annotated tags — Stored as full Git objects with a tagger, date, message, and optional GPG signature. Created with git tag -a <name> -m 'message'.
Use annotated tags for releases. They store metadata (who tagged, when, why) and can be signed for integrity verification.
Tag workflow: 1. When a release is ready, tag the commit: git tag -a v1.2.0 -m 'Release v1.2.0' 2. Push tags to remote: git push origin --tags 3. Downstream systems (CI/CD, deployment tools) reference the tag 4. Users can clone a specific tag: git clone --branch v1.2.0 <url>
Semantic Versioning convention: MAJOR.MINOR.PATCH - MAJOR: incompatible API changes - MINOR: backward-compatible feature additions - PATCH: backward-compatible bug fixes
# Create a release tag git tag -a v1.0.0 -m 'Initial release' # List tags git tag -l 'v*' # View tag details (includes message, tagger, date) git show v1.0.0 # Push tags to remote git push origin v1.0.0 git push origin --tags # push all tags # Checkout a specific tag (detached HEAD) git checkout v1.0.0 # Create a branch from a tag (if you need to work from here) git checkout -b hotfix/v1.0.1 v1.0.0 # Delete a local tag git tag -d v1.0.0 # Delete a remote tag git push origin --delete v1.0.0
semantic-release parse feat: and fix: prefixes to automatically determine the next version number, create an annotated tag, and generate changelogs. This eliminates manual tagging errors.What Git Tags and Releases Actually Do
Git tags are immutable pointers to specific commits, typically used to mark release points (v1.0, v2.3.1). Unlike branches, tags do not move when new commits are added — they freeze a snapshot in time. Releases are the packaged artifacts (e.g., JARs, Docker images) associated with a tag, often built and deployed by CI/CD pipelines.
A tag is created with git tag -a v1.0 -m "Release 1.0" and pushed with git push origin v1.0. Once pushed, it should never be deleted or moved — rewriting history on a public tag breaks reproducibility and confuses downstream consumers. Tags are cheap (just a pointer), but their semantics are strict: they represent a contract that this exact code was shipped.
Use tags to mark every deployment to production, staging, or any long-lived environment. In a GitFlow setup, hotfix tags are critical: they must be applied to both main and develop. Skipping the develop merge means the fix is lost on the next release, causing the bug to reappear. Tags make this audit trail explicit — without them, you cannot prove which code was deployed when.
The Five-Branch Architecture — Why Each Branch Exists
GitFlow uses five branch types, and understanding the purpose of each is more important than memorising their names. Two branches are permanent and never get deleted: main and develop. Three are temporary and get cleaned up after use: feature/, release/, and hotfix/*.
main represents what's in production right now. Every commit on main is a tagged, deployed release. Nothing ever gets committed directly to main — it only ever receives merges from release or hotfix branches. Think of it as the restaurant's dining room: only finished, approved dishes arrive here.
develop is the integration branch — the staging kitchen. It holds the latest completed work that's been approved for the next release. Feature branches are cut from develop and merge back into develop when done. It's always ahead of main, and it might be slightly unstable on any given day, but it's never a mess.
Temporary branches are where the actual work happens. A feature/user-authentication branch gives one team or developer complete isolation. A release/2.4.0 branch freezes the feature set and allows only bug fixes before shipping. A hotfix/fix-payment-gateway-null-crash branch lets you patch production without touching any in-progress work. Every branch type has a strict source and a strict destination — that structure is what prevents the chaos described in the introduction.
# io.thecodeforge — GitFlow Project Setup # ───────────────────────────────────────────────────────────── # Full GitFlow project setup from scratch — no plugins required. # This uses plain Git commands so you understand what's happening # under the hood before you reach for the git-flow CLI extension. # ───────────────────────────────────────────────────────────── # Step 1: Create a new repo and establish the permanent branches. git init ecommerce-platform cd ecommerce-platform # Create an initial commit so 'main' has a history to branch from. echo "# E-Commerce Platform" > README.md git add README.md git commit -m "chore: initial project setup" # Rename the default branch to 'main' if your Git version defaults to 'master'. git branch -M main # Step 2: Create the 'develop' branch from 'main'. # 'develop' is the long-lived integration branch — all feature work lands here. git checkout -b develop # At this point we have our two permanent branches. git branch # * develop # main # Step 3: Start a new feature branch. # Feature branches are ALWAYS cut from 'develop', never from 'main'. # The 'feature/' prefix is a convention, not a Git requirement — but follow it. git checkout -b feature/user-authentication develop # Simulate some development work on the feature. echo "def authenticate_user(email, password): pass" > auth.py git add auth.py git commit -m "feat(auth): add user authentication scaffold" echo "def validate_token(token): pass" >> auth.py git add auth.py git commit -m "feat(auth): add JWT token validation" # Step 4: Merge the completed feature back into 'develop'. # --no-ff (no fast-forward) forces a merge commit, which preserves the # history of the feature branch in the graph. Without this, the feature's # commits get absorbed into develop's linear history and you lose visibility. git checkout develop git merge --no-ff feature/user-authentication -m "merge: integrate user authentication feature into develop" # Clean up the local feature branch — it's served its purpose. git branch -d feature/user-authentication # Step 5: Cut a release branch when develop is ready to ship. # Release branches are cut from 'develop'. Only bug fixes, docs updates, # and release-preparation commits should land here. No new features. git checkout -b release/1.0.0 develop # Simulate a pre-release bug fix found during QA. echo "# auth module v1.0.0" >> auth.py git add auth.py git commit -m "fix(auth): handle empty password edge case before release" # Step 6: Finalise the release — merge into BOTH main AND develop. # main gets the release so production is updated. git checkout main git merge --no-ff release/1.0.0 -m "release: ship v1.0.0 to production" git tag -a v1.0.0 -m "Version 1.0.0 — initial public release" # develop must also receive the release branch changes (e.g., the QA bug fix) # so that the fix isn't lost in future work. git checkout develop git merge --no-ff release/1.0.0 -m "merge: back-port release/1.0.0 fixes into develop" # Clean up the release branch. git branch -d release/1.0.0 echo "GitFlow project structure established successfully."
git log --graph will be a straight line and a git bisect or blame session becomes needlessly painful. Always pass --no-ff to preserve the merge commit and the branch context in your history.Handling Emergency Production Bugs With Hotfix Branches
Here's the scenario no one wants but every team eventually faces: it's Thursday afternoon, version payment processing bug is crashing checkouts for 15% of users. Meanwhile, develop already has three half-finished features merged into it that absolutely cannot ship with this emergency fix.
This is exactly why hotfix branches exist — and why their source branch being main (not develop) is so deliberate. By branching from main, you get a clean copy of exactly what's in production, untainted by anything on develop. You fix only the bug, merge back to main, tag a new patch version, and then — critically — also merge back to develop so the fix isn't lost.
That last step trips people up constantly. If you only merge the hotfix into main and forget develop, the bug you just fixed will silently re-appear in your next scheduled release when develop gets merged to main. It's one of the most insidious mistakes in GitFlow practice.
The hotfix branch also signals urgency to your team through its name. When someone sees hotfix/fix-payment-null-pointer, everyone on the team immediately knows this isn't routine work — it's a production incident, and it has priority.
# io.thecodeforge — GitFlow Hotfix Cycle # ───────────────────────────────────────────────────────────── # GitFlow Hotfix Cycle — Emergency production bug repair. # Scenario: v1.0.0 is live. A null pointer crash is breaking # the payment gateway for a subset of users. develop has # unfinished work that cannot ship. We must fix prod NOW. # ───────────────────────────────────────────────────────────── # Step 1: Branch from 'main' — NOT from 'develop'. # main = what's in production. develop = what's coming next. # We want a clean snapshot of prod to work from. git checkout main git checkout -b hotfix/fix-payment-gateway-null-crash # Step 2: Apply the targeted fix. # In a real scenario this is where your developer fixes the bug. cat > payment_gateway.py << 'EOF' def process_payment(order_id, payment_details): # HOTFIX v1.0.1: Added None guard — payment_details was not # validated upstream, causing a NullPointerError on orders # created via the mobile API which omits the billing_zip field. if payment_details is None: raise ValueError("payment_details cannot be None — check mobile API payload") billing_zip = payment_details.get("billing_zip", "00000") # safe default return {"status": "approved", "order_id": order_id, "zip": billing_zip} EOF git add payment_gateway.py git commit -m "fix(payments): guard against None payment_details from mobile API" # Step 3: Update the version number in the project metadata. # This is important — production tags must be unique and meaningful. echo "1.0.1" > VERSION git add VERSION git commit -m "chore(release): bump version to 1.0.1 for hot 1.0.0 is live, and a criticalfix" # Step 4: Merge hotfix into 'main' and tag the new production version. git checkout main git merge --no-ff hotfix/fix-payment-gateway-null-crash \ -m "hotfix: merge payment gateway null crash fix into main" git tag -a v1.0.1 -m "Version 1.0.1 — Emergency fix for payment gateway null crash" # Step 5: CRITICAL — merge hotfix into 'develop' too. # If you skip this, the bug will resurface in v1.1.0 when develop # gets merged to main. This step is the one most teams forget. git checkout develop git merge --no-ff hotfix/fix-payment-gateway-null-crash \ -m "hotfix: back-port payment gateway null crash fix into develop" # Step 6: Delete the hotfix branch — it has served its purpose. git branch -d hotfix/fix-payment-gateway-null-crash # Verify the tag exists on main git checkout main git log --oneline --graph -5 echo "Hotfix v1.0.1 shipped and back-ported to develop successfully."
- Hotfixes bump PATCH: 1.0.0 → 1.0.1 (bug fix, no new functionality)
- Feature releases bump MINOR: 1.0.0 → 1.1.0 (new functionality, backward compatible)
- Breaking changes bump MAJOR: 1.0.0 → 2.0.0 (backward incompatible changes)
- Anyone reading git tag instantly knows the risk level of each release
GitFlow vs Trunk-Based Development — Choosing the Right Workflow
GitFlow is a powerful model, but it isn't the right model for every team or every product — and knowing when not to use it is as important as knowing how to use it.
GitFlow shines when your team ships scheduled, versioned releases — think desktop software, mobile apps, open-source libraries, or enterprise SaaS with quarterly release windows. The structured branch lifecycle gives you clear separation between what's done, what's being stabilised, and what's in progress. QA teams love it because there's an explicit release branch to test against. Ops teams love it because main is always a known-good, tagged state.
Trunk-based development, by contrast, is better for teams deploying multiple times a day. Everyone commits to a single main branch (or very short-lived feature branches). Feature flags control what's visible in production. The overhead of maintaining five branch types would actively slow these teams down.
The honest answer: if your CI/CD pipeline deploys to production on every merge and your team has mature feature flagging, trunk-based is likely faster for you. If you have a QA cycle, multiple environments, compliance requirements, or a public API with versioned releases, GitFlow's structure pays for itself many times over.
# io.thecodeforge — GitFlow CLI Quickstart # ───────────────────────────────────────────────────────────── # Using the git-flow CLI extension — the faster way once you # understand the underlying model. Install first: # macOS: brew install git-flow-avh # Ubuntu: apt-get install git-flow # Windows: included in Git for Windows # ───────────────────────────────────────────────────────────── # Initialise GitFlow in an existing repo. # This sets up the branch naming conventions in .git/config. # Accept all the defaults by pressing Enter through the prompts, # or use -d flag for fully non-interactive default setup. git flow init -d # ── FEATURE WORKFLOW ────────────────────────────────────────── # Start a feature — automatically branches from 'develop' git flow feature start shopping-cart-persistence # ... do your work, make commits ... echo "def save_cart(user_id, cart_items): pass" > cart.py git add cart.py git commit -m "feat(cart): implement session-based cart persistence" # Finish the feature — merges into develop with --no-ff, deletes branch git flow feature finish shopping-cart-persistence # Output: Switched to branch 'develop' # Merge made by the 'ort' strategy. # Deleted branch feature/shopping-cart-persistence # ── RELEASE WORKFLOW ────────────────────────────────────────── # Start a release branch from develop's current state git flow release start 1.1.0 # Apply only bug fixes and release prep commits here echo "1.1.0" > VERSION git add VERSION git commit -m "chore(release): bump version to 1.1.0" # Finish the release: # - merges into main AND develop # - creates a tag automatically # - deletes the release branch # -m sets the tag message without opening an editor git flow release finish -m "Version 1.1.0 — Shopping cart persistence" 1.1.0 # ── HOTFIX WORKFLOW ─────────────────────────────────────────── # Start a hotfix from main (production) git flow hotfix start fix-cart-total-rounding-error # Fix the bug echo "def calculate_total(items): return round(sum(i.price for i in items), 2)" >> cart.py git add cart.py git commit -m "fix(cart): correct floating-point rounding in total calculation" # Finish hotfix — merges to main AND develop, tags, deletes branch git flow hotfix finish -m "Hotfix: cart total rounding" fix-cart-total-rounding-error # Verify your tag history git tag --list echo "All workflows complete."
- GitFlow adds overhead that pays off for scheduled, versioned releases
- Trunk-based development is faster for teams deploying multiple times per day
- Feature flags replace release branches for continuous deployment teams
- The right workflow matches your deployment cadence, not the other way around
Why You Need to Stop Treating Tags Like Branches
I've lost count of the number of post-mortems I've sat through where the root cause was someone force-pushing a tag. Tags are not branches. They are immutable pointers to a specific commit. Once you move a tag, you've just rewritten history for everyone who depends on that release marker. Git doesn't protect you from yourself here — it will let you overwrite an annotated tag with git push --force --tags and the remote will silently accept it. That's how you get a production deployment claiming to be v2.3.1 that actually contains hotfix code from v2.3.2. The attacker? Decent intentions. The defender? A CI/CD pipeline that doesn't check tag immutability.
Here's the rule: treat annotated tags as signed contracts. If you need to mark a release, create an annotated tag with a message that includes the commit hash and the build number. Never, ever force-push tags. If you mess up, delete the tag locally and remotely (git tag -d v2.3.1 && git push origin :refs/tags/v2.3.1), then create a new tag with a different name. Your CI/CD pipeline should reject any tag that already exists in the remote. This isn't paranoia — it's standard for any regulated environment.
// io.thecodeforge — devops tutorial // Fail the pipeline if tag already exists on remote name: Tag Release Validation on: push: tags: - 'v*' jobs: validate-tag: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check tag uniqueness run: | TAG_NAME="${GITHUB_REF#refs/tags/}" git ls-remote origin refs/tags/${TAG_NAME} | wc -l > tag_count.txt if [ $(cat tag_count.txt) -ne 0 ]; then echo "ERROR: Tag ${TAG_NAME} already exists on remote. Aborting." exit 1 fi - name: Create release run: echo "Deploying release for tag ${GITHUB_REF#refs/tags/}"
git tag -a v2.3.1 HEAD && git push --force --tags, you've just moved the release marker without anyone noticing. Add a server-side hook or CI validation to reject tag re-pushes.Viewing and Filtering Tags When You Have 400 of Them
The competitor docs show you how to click through a UI to view tags. That's fine if you have three tags and eight commits. But when your repo has 400 tags accumulated over four years of bi-weekly releases, the UI is useless. You need to filter in the terminal, and you need to filter fast.
The core command is git tag -l with a pattern. Most teams use semantic versioning, so git tag -l "v2.." will show you all v2 releases. Need to see only release candidates? git tag -l "vrc" will pull every RC tag. Pair it with --sort=-creatordate to see the most recent first: git tag -l "v2.." --sort=-creatordate | head -10. That's how you find the last stable release to cherry-pick into a hotfix.
Deleting tags in bulk is another skill. Never do this manually. The command git push origin --delete $(git tag -l "v2.0.0-*" | grep -E 'rc|beta') will wipe all RC and beta tags for the v2.0.0 series from the remote — but only if you're absolutely certain. Test it locally first by running the grep part alone. And yes, you should do this before a major release to clean up old garbage.
// io.thecodeforge — devops tutorial // View all v2 release tags, newest first git tag -l "v2.*.*" --sort=-creatordate | head -10 // Output: // v2.4.1 // v2.4.0 // v2.3.2 // v2.3.1 // v2.3.0 // v2.2.3 // v2.2.2 // v2.2.1 // v2.2.0 // v2.1.4 // Delete all RC tags for v2.0.0 series from remote git push origin --delete $(git tag -l "v2.0.0-*" | grep -E 'rc|beta')
git tag -l "v..*" --sort=-creatordate | head -5 into a CI job step to print the last five releases in your build log. It's a cheap way to surface the exact commit you need for a hotfix without asking a human.git tag -l with patterns and sorting. Never manually delete tags — script it.Hotfix Not Back-Ported to Develop: Bug Reappears in Next Release
git checkout -b hotfix/fix-payment-null main.
3. The fix was applied and merged to main with tag v1.0.1.
4. The developer forgot to merge the hotfix branch back to develop.
5. Three weeks later, develop was merged to main for the v1.1.0 release.
6. Since develop never received the hotfix, the null pointer code was reintroduced.
7. v1.1.0 shipped with the same bug that was fixed in v1.0.1.
8. The team spent 6 hours bisecting before identifying the root cause.git cherry-pick <hotfix-sha>.
3. Re-tag v1.1.0 with the fix included: git tag -f -a v1.1.0.
4. Team rule: hotfix finish must always merge to both main AND develop. Added a CI check that verifies hotfix commits appear in both branches.
5. Added a post-merge hook that warns when a hotfix branch is deleted without a corresponding merge to develop.- Hotfix branches must merge to BOTH main AND develop. Skipping develop causes the bug to reappear in the next release.
- main and develop are separate branches. A merge to main does not affect develop.
- Add a CI check that verifies hotfix commits appear in both main and develop after the hotfix branch is deleted.
- When debugging a regression, check if the fix was ever merged to develop — do not assume it was.
git log develop --oneline | grep <hotfix-sha-prefix>.
2. If missing: cherry-pick the hotfix commit to develop: git cherry-pick <hotfix-sha>.
3. If the release already shipped: revert the deployment, back-port the fix, re-tag.
4. Prevention: add CI check that verifies hotfix commits appear in both main and develop.git rebase develop from the feature branch.
3. Resolve conflicts incrementally during the rebase (one commit at a time).
4. If too messy: consider squashing the feature branch first, then rebasing the single commit.
5. Prevention: keep feature branches short-lived (max 1-2 weeks). Use feature flags for long-running work.git log release/1.1.0 --oneline — look for feat: commits.
2. Revert them on the release branch: git revert <commit-sha> for each.
3. If the features are needed: they wait for the next release cycle. Do not cherry-pick them back.
4. Prevention: enforce PR labels. Release branches only accept fix:, chore:, docs: prefixes.git log develop --oneline -10 — find the most recent merge.
2. Revert the merge: git revert -m 1 <merge-commit-sha> (reverts the merge on develop).
3. Notify the feature branch owner to fix their branch before re-merging.
4. Prevention: require CI to pass on the feature branch before merging to develop.git log release/1.1.0 --oneline vs git log release/1.2.0 --oneline.
3. If release/1.1.0 is the priority: finish it first (merge to main + develop), then cut release/1.2.0.
4. If release/1.2.0 supersedes 1.1.0: delete 1.1.0 and proceed with 1.2.0.
5. Prevention: only one release branch at a time. Finish or delete before cutting a new one.git log develop --oneline | grep <hotfix-sha-prefix>git cherry-pick <hotfix-sha> (back-port to develop)git checkout feature/branch && git rebase developgit log develop..feature/branch --oneline (see diverged commits)git log release/x.x.x --oneline (find feat: commits)git revert <commit-sha> (revert each offending commit)git log develop --oneline -5 (find the breaking merge)git revert -m 1 <merge-commit-sha> (revert the merge)git log release/1.1.0 --oneline (see commits)git log release/1.2.0 --oneline (see commits)| Aspect | GitFlow | Trunk-Based Development |
|---|---|---|
| Permanent branches | main + develop | main only |
| Feature isolation | Dedicated feature/* branches | Short-lived branches or direct commits |
| Release management | Explicit release/* branch with stabilisation window | Feature flags control release visibility |
| Hotfix process | hotfix/* from main, merged to main + develop | Commit directly to main, deploy immediately |
| Best suited for | Scheduled releases, versioned APIs, mobile apps | SaaS with continuous deployment, high-frequency releases |
| Branch complexity | High — 5 branch types with strict rules | Low — one branch, maximum simplicity |
| Parallel version support | Excellent — maintain v1.x and v2.x simultaneously | Difficult — requires additional branching strategy |
| CI/CD compatibility | Works well with staged environments (dev/staging/prod) | Optimal — every commit can be production-ready |
| Team size sweet spot | Medium to large teams with defined roles | Any size, especially high-trust senior teams |
| Risk of merge conflicts | Higher — long-lived feature branches diverge more | Lower — frequent integration keeps branches short |
| File | Command / Code | Purpose |
|---|---|---|
| 01_tags_basics.sh | git tag -a v1.0.0 -m 'Initial release' | What Are Git Tags |
| io | git init ecommerce-platform | The Five-Branch Architecture |
| io | git checkout main | Handling Emergency Production Bugs With Hotfix Branches |
| io | git flow init -d | GitFlow vs Trunk-Based Development |
| TagGuardPipeline.yml | name: Tag Release Validation | Why You Need to Stop Treating Tags Like Branches |
| TagFilterCommands.yml | git tag -l "v2.*.*" --sort=-creatordate | head -10 | Viewing and Filtering Tags When You Have 400 of Them |
Key takeaways
Interview Questions on This Topic
Frequently Asked Questions
GitFlow uses five branch types (main, develop, feature, release, hotfix) and is designed for scheduled, versioned releases with a stabilisation window. GitHub Flow is much simpler — it uses just one main branch and short-lived feature branches that merge directly to main after a pull request review. GitHub Flow suits teams deploying continuously; GitFlow suits teams with defined release cycles and QA gates between development and production.
No — GitFlow is a branching model, not a tool. The git-flow CLI extension automates the branch creation, merging, and deletion steps, but everything it does is plain Git under the hood. Learning the raw Git commands first (as shown in this article) is genuinely worth the time because it means you understand what's happening and can troubleshoot when something goes wrong, rather than being dependent on the tool.
Yes, and this is one of GitFlow's core strengths. Each developer or team works on their own isolated feature/* branch simultaneously. They all eventually merge back into develop independently. The key discipline is keeping feature branches short-lived — the longer a feature branch lives, the more it diverges from develop and the harder the eventual merge becomes. If a feature will take more than a week or two, consider using feature flags to merge incomplete work safely.
The bug you fixed will reappear in your next scheduled release. When develop is merged to main for the next release, the hotfix commit is not in develop's history, so the buggy code is reintroduced. This is the single most common GitFlow mistake. Prevention: add a CI check that verifies hotfix commits appear in both main and develop after the hotfix branch is deleted.
The decision depends on deployment cadence. If you ship on a schedule (weekly, monthly, quarterly) with QA gates, GitFlow's structure prevents half-finished work from reaching production. If you ship on every merge (continuous deployment), trunk-based development with feature flags is faster. The test: how often do you deploy? More than once a day: trunk-based. Less than once a week: GitFlow. In between: evaluate your QA and compliance requirements.
20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.
That's Git. Mark it forged?
5 min read · try the examples if you haven't