Rain Lag

The One-Question Branch Strategy: A Tiny Git Habit to Keep Features Small and Shippable

How adopting a simple “one-question per branch” rule can transform your Git workflow into a flow of small, safe, and shippable changes.

The One-Question Branch Strategy: A Tiny Git Habit to Keep Features Small and Shippable

Software teams rarely fail because they can’t write code. They fail because they can’t safely ship it.

Branches balloon in scope. Pull requests turn into novels. Merges become nightmares. Everyone swears they’ll “keep it smaller next time” — and then doesn’t.

A surprisingly small habit can change that: the one-question branch strategy.

Instead of thinking in terms of “features” or “tickets,” you think in terms of questions:

Each branch must answer exactly one question.

From that one constraint, you get smaller changes, faster reviews, safer deploys, and a Git history that actually tells a story.

In this post, we’ll walk through how to apply the one-question rule, keep branches short‑lived and small, use feature flags, and maintain a clean Git history that makes debugging and collaboration easier.


What Is the One-Question Branch Strategy?

Most branches start with something like:

  • feature/user-profile-page
  • bugfix/payment-timeout

That’s fine, but it’s vague. The real, actionable unit of work is usually smaller and more specific. The one-question strategy forces you to express that specificity.

Examples of good, “one-question” branches:

  • feat/can-users-edit-avatarQuestion: Can users edit their profile avatar?
  • bug/fix-payment-timeout-on-slow-networkQuestion: Does payment still work on a slow network?
  • chore/add-logging-to-order-processingQuestion: Do we have enough logs to debug order processing failures?

Each branch exists to answer exactly one focused question or user need. If, while working, you find yourself answering a second question, that’s a signal to:

  • Split the work into another branch, or
  • Finish the current question, merge, and start fresh.

This constraint is small, but it has big consequences:

  • Branches become naturally smaller.
  • Work stays shippable;
  • Reviews are easier to reason about.

Always Start From a Clean, Stable Main

The one-question strategy works best when you respect this baseline rule:

Never develop directly on main. Always branch off it.

Why this matters:

  • main stays stable and deployable.
  • Experiments and risky changes live on dedicated feature branches.
  • It’s clear what’s production-ready versus in-progress.

A typical flow:

git checkout main git pull origin main # name your branch after the question it answers git checkout -b feat/can-users-edit-avatar

This separation protects your team: nobody accidentally ships half-baked ideas, and rollbacks remain straightforward.


Keep Branches Short-Lived and Synced

Long-lived branches are how conflicts and merge hell happen.

Instead, aim for short-lived feature branches:

  • A few hours to a few days, not weeks.
  • Small, vertical slices of value — enough to answer one question.

To avoid painful drift, sync with main frequently:

git checkout main git pull origin main git checkout feat/can-users-edit-avatar git rebase main # or merge, depending on your workflow

Frequent syncing:

  • Keeps your branch up to date with others’ changes.
  • Reduces the size and complexity of merge conflicts.
  • Ensures your work is always close to deployable.

Short‑lived, frequently synced branches never have time to grow fangs.


Small, Shippable Pull Requests

The whole point of one-question branches is to produce small, shippable pull requests (PRs).

A shippable PR should:

  • Answer the question in the branch name.
  • Be reviewable in one sitting (ideally under ~400 lines of effective change).
  • Have a clear success criterion (e.g., “User can upload and crop an avatar”).

Benefits of small PRs:

  • Faster reviews: Less cognitive load, easier to spot mistakes.
  • Better quality: Reviewers can understand the intent and spot design issues.
  • Safer deploys: Rollbacks revert a tiny, well-defined change.

If your PR description has to use the word “and” several times —

“Implements avatar upload and profile rearrange and refactors auth”

— you’re probably dealing with more than one question.


Use Feature Flags to Merge Early and Often

Sometimes, the answer to your question takes more than one day — or the UI isn’t ready, but the backend is.

You still want to keep branches small and merged frequently. This is where feature flags shine.

Feature flags (or toggles):

  • Let you merge incomplete work into main.
  • Keep risky behavior disabled in production until it’s ready.
  • Allow trunk-based or trunk-friendly development without breaking users.

Example pattern:

// pseudo-code if (isFeatureEnabled('user-avatar-edit')) { showAvatarEditUI(); }

With flags, you can:

  • Build the backend in one branch.
  • Add the UI in another.
  • Wire them up in a third.

Each branch answers a single question, all merged behind a flag. When everything is ready, you flip the flag on.

This keeps your branches short-lived and your main branch continuously releasable.


Commit Often, but Make Each Commit Tell a Story

Branches tell a high-level story (“Can users edit avatars?”).

Commits tell the chapter-by-chapter story of how you got there.

Two guidelines:

  1. Commit often. Don’t wait for perfection.
  2. Write clear, descriptive commit messages that capture the why, not just the what.

Bad commit messages:

  • fix stuff
  • wip
  • changes

Better commit messages:

  • Add Avatar model field to store uploaded image path
  • Validate image size and type before saving avatar
  • Show avatar preview and error messages in profile form

If someone is debugging an issue six months later, your commit messages should help them answer:

  • Why was this change made?
  • What problem was this commit trying to solve?

The one-question branch gives context. Good commits give detail.


Maintain a Clean, Understandable Git History

A clean history is not about aesthetics. It’s about debuggability and collaboration.

Consistent branching and merge practices help:

  • Track when and why behavior changed.
  • Bisect regressions effectively.
  • Onboard new team members faster.

Some practical habits:

  1. Use consistent branch naming.

    • feat/... for features
    • bug/... for bug fixes
    • chore/... for non-feature work
  2. Avoid huge merge commits.

    • Sync early and often to keep merges small.
    • Use rebase (if your team agrees) to keep history linear and readable.
  3. Squash when appropriate.

    • Squash noisy, experimental commits into a meaningful unit once the branch is ready.
    • Result: one commit per question answered, or a small, cohesive set.
  4. Tie branches and commits to issues or tickets.

    • Reference IDs in branch names or commit messages.
    • Example: feat/1234-can-users-edit-avatar.

The end result: reading git log feels like reading a clear narrative of what the system learned and when.


Putting It All Together: A Sample Workflow

Here’s what a typical one-question branch workflow might look like in practice:

  1. Start with a question.
    “Can users upload and edit their profile avatar?”

  2. Create a branch from main.
    git checkout -b feat/can-users-edit-avatar

  3. Implement in small, related commits.
    Each commit moves you closer to answering the question.

  4. Sync with main regularly.
    Rebase or merge to avoid falling behind.

  5. Use a feature flag if it’s not fully ready.
    Merge backend or partial UI behind user-avatar-edit flag.

  6. Open a small, focused PR.
    Description: what question this branch answers, how, and how to test it.

  7. Ship and clean up.
    Once merged, delete the branch. Flip the feature flag when ready.

Repeat for the next question.


Conclusion: One Question at a Time

You don’t need an elaborate Git ceremony to improve your workflow. You need consistency and constraints.

The one-question branch strategy gives you both:

  • One question per branch keeps scope tight and focused.
  • Short-lived, frequently synced branches prevent merge nightmares.
  • Small, shippable pull requests speed up reviews and reduce risk.
  • Feature flags let you merge early without exposing incomplete work.
  • Clear commits and consistent workflows create a Git history you can trust.

Adopt this tiny habit, and your team’s work stops being a tangle of half-finished features and becomes a stream of small, safe, and shippable answers — one question at a time.

The One-Question Branch Strategy: A Tiny Git Habit to Keep Features Small and Shippable | Rain Lag