exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 37 discussion

Actual exam question from Cisco's 350-901
Question #: 37
Topic #: 1
[All 350-901 Questions]

A developer is working on a bug fix. The existing branch named 'bugfix05328' needs to be merged with the current working primary branch named
'prim404880077'. All changes must be integrated into a single commit instead of preserving them as individual commits. Which git command must be used?

  • A. git checkout ג€" ג€"squash bugfix05328
  • B. git merge ג€" ג€"squash bugfix05328
  • C. git rebase ג€" ג€"merge bugfix05328
  • D. git push ג€" ג€"rebase bugfix05328
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
RukiaTester
Highly Voted 1 year, 2 months ago
Selected Answer: B
B. https://stackoverflow.com/questions/5308816/how-can-i-merge-multiple-commits-onto-another-branch-as-a-single-squashed-commit 2549 Say your bug fix branch is called bugfix and you want to merge it into master: git checkout master git merge --squash bugfix git commit This will take all the commits from the bugfix branch, squash them into 1 commit, and merge it with your master branch.
upvoted 8 times
designated
9 months, 2 weeks ago
It seems correct
upvoted 2 times
...
...
Johnno26
Most Recent 1 year, 5 months ago
Selected Answer: B
B seems correct. The merge --squash feature takes all the commits from the bugfix branch, squash them into 1 commit, and merge it with your master branch.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...