hardMultiple ChoiceObjective-mapped
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 run tests locally before commit, and CI blocks merges that fail tests.
- ✗
Trunk-based development with feature toggles
Why it's wrong here
Feature toggles allow incomplete code in the main branch, but tests may still fail.
- ✗
Feature branching with manual merge
Why it's wrong here
Manual merge does not automatically run tests; it relies on the developer to test.
- ✗
GitFlow with hotfix branches
Why it's wrong here
GitFlow is a branching strategy but does not automatically enforce test passing.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 989-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 →
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.