Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 549
Developer is working on a new feature and made changes on a branch named 'branch-413667549a-new'. When merging the branch to production, conflicts occurred. Which Git command must the developer use to recreate the pre-merge state?
Answer options
- A. git merge ג€"no-edit
- B. git merge ג€"commit
- C. git merge ג€"revert
- D. git merge ג€"abort
Correct answer: D
Explanation
The correct command is 'git merge --abort', which cancels the merge process and restores the branch to its pre-merge state. The other options do not revert the merge process: '--no-edit' allows merging without editing the commit message, '--commit' finalizes the merge, and '--revert' is used to undo a completed commit rather than aborting a merge.