CompTIA DataX (CNX-001) — Question 26

A cloud architect needs to change the network configuration at a company that uses GitOps to document and implement network changes. The Git repository uses main as the default branch, and the main branch is protected. Which of the following should the architect do after cloning the repository?

Answer options

Correct answer: B

Explanation

The correct approach is to create a new branch for the changes and submit a pull request, as this adheres to best practices in GitOps, especially when the main branch is protected. Making changes directly to the main branch or to another branch without pull requests undermines the control and review process. Rebasing the main branch is not applicable here since you should not modify the protected branch directly.