200-901 exam dumps

200-901 practice question 31 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 31

Single answer

You are collaborating on a Git repository with your team. While merging a feature branch into the main branch, a conflict arises in a file named 'app.py'. After resolving the conflict locally, which sequence of Git commands should you execute to correctly complete the merge process and ensure that the main branch reflects the resolved state?

  1. A

    git add app.py, git commit, git push

  2. B

    git commit -m 'Resolved conflict in app.py', git push

  3. C

    git merge --continue, git push

  4. D

    git add app.py, git merge --continue, git push

Show answer and explanation

Correct answer: A

Explanation

When a merge conflict occurs, you need to manually resolve the conflict in the affected files. After resolving, you must stage the file(s) using 'git add', commit the changes to finalize the resolution, and then push the updated branch to the remote repository. This ensures that all collaborators receive the resolved state in their local repositories.

  • A. Correct.

    Correct. After resolving the conflict, you need to stage the resolved file using 'git add', commit the resolution, and then push the changes to the remote repository.

  • B. Incorrect.

    Incorrect. While 'git commit' resolves the conflict locally, you must first stage the resolved file using 'git add' before committing.

  • C. Incorrect.

    Incorrect. 'git merge --continue' is used in other workflows such as interactive rebases but is not applicable here without staging the changes first.

  • D. Incorrect.

    Incorrect. While 'git add' is used to stage the resolved file, 'git merge --continue' is not required after resolving a merge conflict manually. Instead, you should commit and push the changes.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam