Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 182

A developer is working on a feature for a new application. The changes in the existing branch named 'feat00304' must be integrated into a single commit with the current working primary branch named 'prodapp411926287'. Which git command must be used?

Answer options

Correct answer: B

Explanation

The correct command is 'git merge --squash feat00304' because it combines all changes from the 'feat00304' branch into a single commit without creating a separate merge commit. The other options do not achieve the goal of squashing commits into one; 'git rebase' and 'git push' serve different purposes, and 'git checkout' does not include merging functionality.