nerdexam
Cisco

200-901 · Question #266

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…

The correct answer is B. git merge --squash feat00304. git merge --squash feat00304 stages all the changes from the feature branch into the working tree as a single uncommitted set of changes. The developer then makes one explicit commit, resulting in a clean, single-commit integration into the primary branch - preserving the work…

Software Development and Design

Question

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?

Options

  • Agit rebase --merge feat00304
  • Bgit merge --squash feat00304
  • Cgit push --rebase feat00304
  • Dgit checkout --squash feat00304

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    89% (31)
  • C
    3% (1)
  • D
    6% (2)

Explanation

git merge --squash feat00304 stages all the changes from the feature branch into the working tree as a single uncommitted set of changes. The developer then makes one explicit commit, resulting in a clean, single-commit integration into the primary branch - preserving the work without the full commit history of the feature branch. git rebase --merge is not a valid flag combination for this purpose. git push --rebase is not a valid command. git checkout --squash does not exist.

Topics

#Git#Branching and Merging#Version Control#Squash Commit

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice