N10-009 Question 135
Single answerSource control: Version control, Central repository, Conflict identification, BranchingA network operations team stores router and firewall configuration templates in a Git-based central repository. An administrator creates a branch to update NTP settings for several branch offices, while another administrator updates the same template in the main branch to change SNMP community strings. When the first administrator tries to merge the branch back into the central repository, the system reports a merge conflict in the template file. What is the BEST action to take next?
- A
Force-push the branch to overwrite the main branch so the NTP changes are not lost
- B
Delete the branch and recreate the NTP changes directly in the main branch to avoid version history issues
- C
Review the conflicting sections, manually reconcile both sets of changes, test the merged template, and then complete the merge
- D
Commit the conflicted file as-is to the central repository so both versions are preserved for later comparison
Show answer and explanation
Correct answer: C
Explanation
This question tests practical use of source control in infrastructure and network configuration management. Branching allows administrators to work on changes independently, while a central repository provides a shared source of truth and history. When two people modify the same part of a file, version control systems such as Git flag a merge conflict because the conflict must be resolved intentionally. Best practice is to review the conflicting sections, reconcile the intended changes, test the final template, and then complete the merge. This approach aligns with common Git workflows and change-management practices used in infrastructure-as-code and network automation environments. Relevant references include the official Git documentation on branching and merge conflicts, which explains manual conflict resolution and validation before committing the merge.
- A. Incorrect.
This is incorrect. Force-pushing to overwrite the main branch is risky and can discard other administrators' valid changes, such as the updated SNMP settings. In a shared central repository, force-push should be tightly controlled because it rewrites history and can disrupt collaboration.
- B. Incorrect.
This is incorrect. Deleting the branch and redoing the work in the main branch removes the benefits of branching and does not address the conflict safely. It also increases the chance of human error and loses the clear audit trail that version control is intended to provide.
- C. Correct.
This is correct. A merge conflict means both branches changed overlapping content and Git cannot automatically decide which version to keep. The proper next step is to inspect the conflicting lines, combine the intended NTP and SNMP changes as needed, validate the resulting template, and then commit the resolved merge. This preserves version history and supports controlled change management.
- D. Incorrect.
This is incorrect. A conflicted file cannot simply be committed in an unresolved state as a valid merge result in normal workflow. Conflict markers are placeholders for human review, not a final configuration. Leaving them unresolved would produce an invalid template and could cause deployment failures.