---
tags:
- devops
- l1
- flashcard-deck
- git-workflows
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [Git Workflows & Branching Strategies](../../../../library/portal/topics.md) | **Domain:** DevOps & Tooling
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
git-workflows/a1b2c3d4	git-workflows	easy	trunk-based, workflows	What is trunk-based development?	Everyone commits to main (the trunk). Feature branches live less than one day. Incomplete features are hidden behind feature flags, not long-lived branches.	training/library/topics/git-workflows/primer.md
git-workflows/b2c3d4e5	git-workflows	easy	github-flow, workflows	How does GitHub Flow differ from trunk-based development?	GitHub Flow uses feature branches with pull requests into main. Branches can live 1-3 days (vs <1 day in TBD). Both use a single main branch with no develop or release branches.	training/library/topics/git-workflows/primer.md
git-workflows/c3d4e5f6	git-workflows	easy	gitflow, workflows	What are the five branch types in GitFlow?	Develop, Feature, Release, Hotfix, and Main. Mnemonic: DFRHM. Main holds production releases, develop is the integration branch, features branch from develop, releases stabilize code, hotfixes patch production.	training/library/topics/git-workflows/primer.md
git-workflows/d4e5f6a7	git-workflows	easy	gitlab-flow, workflows	What is the core principle of GitLab Flow?	Code flows one direction through environment branches: main -> staging -> production. You never commit directly to environment branches — you merge from upstream. Mnemonic: "Water flows downhill."	training/library/topics/git-workflows/primer.md
git-workflows/e5f6a7b8	git-workflows	easy	release-branching, workflows	When should you use release branching?	When you support multiple released versions simultaneously (e.g., PostgreSQL 14/15/16/17). Each release branch is a promise to patch that version until its EOL date. Mnemonic: "Branch per promise."	training/library/topics/git-workflows/primer.md
git-workflows/f6a7b8c9	git-workflows	easy	merge, strategies	What are the three main merge strategies in Git?	1) Merge commit (--no-ff): preserves full branch history. \n2) Rebase: replays commits for linear history. \n3) Squash merge: combines all branch commits into one. Mnemonic: MRS — Merge, Rebase, Squash.	training/library/topics/git-workflows/primer.md
git-workflows/a7b8c9d0	git-workflows	easy	trunk-based, feature-flags	Why are feature flags essential for trunk-based development?	Feature flags decouple deployment from release. Code ships to production on every commit but new features are hidden behind flags until ready. Without flags, unfinished features would be visible to users.	training/library/topics/git-workflows/primer.md
git-workflows/b8c9d0e1	git-workflows	easy	branch-protection, safety	Why is branch protection the most important workflow enforcement mechanism?	Without branch protection, your workflow is just a suggestion. Any developer can push directly to main, skip CI, or force-push. Branch protection makes the rules mandatory, not optional.	training/library/topics/git-workflows/footguns.md
git-workflows/c9d0e1f2	git-workflows	easy	github-flow, deploy	What is the deployment model in GitHub Flow?	Main is always deployable. Deployments happen from main — either automatically on merge or on a schedule. There are no release branches. Rollback = revert the merge commit.	training/library/topics/git-workflows/primer.md
git-workflows/d0e1f2a3	git-workflows	easy	gitflow, origin	Who created GitFlow and when?	Vincent Driessen published "A Successful Git Branching Model" on January 5, 2010. In 2020, he added a note saying GitFlow is NOT suitable for teams practicing continuous delivery.	training/library/topics/git-workflows/primer.md
git-workflows/e1f2a3b4	git-workflows	medium	trunk-based, ci-cd	What CI/CD pattern does trunk-based development use?	Push to main triggers the full test suite, then auto-deploys to production. Feature flags control visibility. There is one pipeline for one branch. Rollback = turn off the flag or deploy a previous commit.	training/library/topics/git-workflows/primer.md
git-workflows/f2a3b4c5	git-workflows	medium	gitflow, hotfix	What is the most common GitFlow hotfix mistake?	Forgetting to merge the hotfix to BOTH main AND develop. If you only merge to main, the fix is missing in develop and will regress on the next release. Mnemonic: "Hotfix hits home AND dev."	training/library/topics/git-workflows/street_ops.md
git-workflows/a3b4c5d6	git-workflows	medium	merge, bisect	Why does squash-merging reduce git bisect effectiveness?	Squash merge combines all PR commits into one. git bisect can only narrow to the PR level, not the individual change. A squash commit with 847 lines across 23 files cannot be further bisected.	training/library/topics/git-workflows/footguns.md
git-workflows/b4c5d6e7	git-workflows	medium	rebase, shared-branches	Why should you never rebase a shared branch?	Rebase rewrites commit SHAs. Anyone who pulled the old branch now has orphaned commits. Their next pull creates duplicate commits, phantom conflicts, or silently lost work. Rule: "Rebase your own, merge everyone's."	training/library/topics/git-workflows/footguns.md
git-workflows/c5d6e7f8	git-workflows	medium	cherry-pick, drift	What is cherry-pick drift and why is it dangerous?	When fixes are cherry-picked to some release branches but not others, or not backported to main. Over time, different branches have different bug fixes. Users on older versions hit bugs that were fixed elsewhere.	training/library/topics/git-workflows/footguns.md
git-workflows/d6e7f8a9	git-workflows	medium	decision, framework	What four factors determine which Git workflow to choose?	FAST: Frequency (how often you deploy), Active versions (how many you support), Stage gates (do you have staging/prod promotion), Team size. Walk through these and the workflow picks itself.	training/library/topics/git-workflows/primer.md
git-workflows/e7f8a9b0	git-workflows	medium	long-lived, branches	At what branch age does merge conflict probability become critical?	Beyond 3 days, conflict probability rises sharply with team size. A 2-day branch in a 5-person team has ~10% conflict chance. A 2-week branch has ~80%. Rule: "Three days? Three-alarm fire."	training/library/topics/git-workflows/footguns.md
git-workflows/f8a9b0c1	git-workflows	medium	gitflow, cadence	Why is GitFlow a poor fit for teams deploying multiple times per day?	GitFlow adds ceremony (develop branch, release branches, back-merges) designed for scheduled releases. For continuous delivery, this overhead provides no benefit — you spend more time on branch management than writing code.	training/library/topics/git-workflows/footguns.md
git-workflows/a9b0c1d2	git-workflows	medium	release, cutting	What is the difference between tag-based and branch-based releases?	Tag-based: tag a commit on main, CI builds artifacts from the tag. Used in TBD/GitHub Flow. Branch-based: cut a release/X.Y branch from develop, stabilize, merge to main, tag. Used in GitFlow.	training/library/topics/git-workflows/street_ops.md
git-workflows/b0c1d2e3	git-workflows	medium	stacked-prs, review	What are stacked PRs and when should you use them?	A chain of PRs where each builds on the previous: PR#1 → main, PR#2 → PR#1, PR#3 → PR#2. Used for large features that are too big for one PR. Reviewed and merged bottom-up.	training/library/topics/git-workflows/street_ops.md
git-workflows/c1d2e3f4	git-workflows	medium	force-push, safety	What is --force-with-lease and when should you use it?	--force-with-lease force-pushes only if nobody else has pushed since your last fetch. It prevents overwriting others' work. Use it instead of --force when you must update a remote branch after a rebase.	training/library/topics/git-workflows/footguns.md
git-workflows/d2e3f4a5	git-workflows	medium	migration, gitflow	What is the first step when migrating from GitFlow to trunk-based?	Assessment: verify CI runs in <15 minutes, test coverage is >80%, and the team understands feature flags. Do not kill the develop branch until your CI and test infrastructure can protect main.	training/library/topics/git-workflows/street_ops.md
git-workflows/e3f4a5b6	git-workflows	medium	gitlab-flow, pitfall	What happens if you merge directly to the production branch in GitLab Flow?	You bypass staging, skip integration testing, and create a state where production has code that staging does not. Staging is no longer a reliable pre-production environment. Fix: enforce promotion rules with branch protection.	training/library/topics/git-workflows/footguns.md
git-workflows/f4a5b6c7	git-workflows	medium	merge, revert	How do you revert a feature that was merged with a merge commit vs squash-merged?	Merge commit: git revert -m 1 <merge-SHA> (must specify parent). Squash merge: git revert <squash-SHA> (simple, one commit). Squash is easier to revert but loses bisect granularity.	training/library/topics/git-workflows/primer.md
git-workflows/a5b6c7d8	git-workflows	medium	monorepo, workflow	What workflow works best for monorepos and why?	Trunk-based development with feature flags. GitFlow in a monorepo creates merge nightmares because one branch contains multiple services. Path-based CI triggers and CODEOWNERS handle the multi-service complexity.	training/library/topics/git-workflows/street_ops.md
git-workflows/b6c7d8e9	git-workflows	hard	merge, blame	Why does git blame often show merge commits on GitFlow's develop branch?	Because feature branches are merged with merge commits, git blame attributes lines to the merge commit author rather than the original commit author. Use git blame -w --first-parent or git log --follow for better results.	training/library/topics/git-workflows/footguns.md
git-workflows/c7d8e9f0	git-workflows	hard	release, backport	What is the correct order for backporting a fix across release branches?	Fix on main first, then cherry-pick to the newest release branch, then to older branches. "Fix forward, port backward." Track with labels (needs-backport-X.Y) and automate with bots.	training/library/topics/git-workflows/street_ops.md
git-workflows/d8e9f0a1	git-workflows	hard	trunk-based, google	How does Google practice trunk-based development at scale?	Google uses a single monorepo (Piper) with 25,000+ engineers committing to trunk. Tooling includes CitC (virtual workspaces), TAP (continuous testing), and code review before commit. Most teams lack Google-scale tooling.	training/library/topics/git-workflows/primer.md
git-workflows/e9f0a1b2	git-workflows	hard	migration, develop	What is the riskiest moment when migrating from GitFlow to trunk-based?	Merging develop into main and deleting the develop branch. If CI is not solid, main will break immediately. The prerequisite: CI runs in <15 minutes, test coverage >80%, and feature flag infrastructure is ready.	training/library/topics/git-workflows/street_ops.md
git-workflows/f0a1b2c3	git-workflows	hard	workflow, mismatch	What organizational signal indicates a workflow/cadence mismatch?	When the team spends more time on branch management (cutting releases, back-merging, resolving merge conflicts) than writing features. A 15-person SaaS team on GitFlow recovered 8 engineering hours per week by switching to GitHub Flow.	training/library/topics/git-workflows/footguns.md
git-workflows/a0b1c2d3	git-workflows	hard	squash, compromise	What merge strategy compromise balances clean history and bisect granularity?	Squash-merge small PRs (<100 lines) for clean history. Use merge commits for large PRs to preserve bisect granularity. Keep PRs small so even squashed commits have manageable diffs.	training/library/topics/git-workflows/primer.md
git-workflows/b1c2d3e4	git-workflows	hard	release, spof	Why is a single release manager a risk in GitFlow?	One person managing release cuts, cherry-picks, merges, and tags is a single point of failure. When they are unavailable, releases stall. Fix: document the runbook, automate with tooling, and rotate the role across 3+ people.	training/library/topics/git-workflows/footguns.md

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [Git Workflows & Branching Strategies](../../../../library/topics/git-workflows/index.md) (Topic Pack, L2) — Git Workflows & Branching Strategies

<!-- wiki:related:end -->
