Courseiva
hardMultiple Choice

200-901 A team uses Git for source control Practice Question

A team uses Git for source control. They want to ensure that all code committed to the main branch passes unit tests and linting. Which Git workflow practice best ensures this?

⚠ Common exam trap

Cisco often tests the distinction between a workflow that merely organizes branches (like GitFlow or trunk-based development) and one that actively enforces quality gates (like pre-commit hooks combined with CI), leading candidates to confuse branching strategies with automated validation mechanisms.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Using pre-commit hooks and CI pipeline to block failing commits

Pre-commit hooks run unit tests and linting locally before a commit is created, preventing failing code from entering the repository. A CI pipeline then verifies the same checks on the remote branch before allowing a merge to main, ensuring only passing code is integrated. This combination enforces quality gates at both the developer workstation and the server side, directly addressing the requirement to block failing commits.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Using pre-commit hooks and CI pipeline to block failing commits

    Why this is correct

    Pre-commit hooks catch lint and test failures locally before the commit is created, while the CI pipeline re-runs the same checks server-side and blocks merges into main. Together they enforce the constraint that no failing code reaches the main branch.

  • ✗

    Trunk-based development with feature toggles

    Why it's wrong here

    Trunk-based development with feature toggles merges incomplete work directly into main, relying on toggles rather than a gate, so nothing blocks a commit that fails tests or linting. It suits rapid continuous delivery where toggles hide unfinished features, not enforced pre-merge validation.

  • ✗

    Feature branching with manual merge

    Why it's wrong here

    Feature branching with manual merge depends on a human deciding when to integrate, so a failing commit can still reach main if the reviewer merges it. It fits small teams coordinating occasional parallel work, not a requirement that every commit be automatically validated.

  • ✗

    GitFlow with hotfix branches

    Why it's wrong here

    GitFlow with hotfix branches permits direct commits and merges to main during urgent fixes, bypassing any automated test or lint gate. It suits teams managing scheduled releases and parallel maintenance versions, not a workflow guaranteeing every main-branch commit passes checks.

About these practice questions

This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.