You need to the merge the POC branch into the default branch. The solution must meet the technical requirements. Which command should you run?


Microsoft AZ-400 Exam

Questions Number: 395 out of 535 Questions
73.83%

Question 395
You need to the merge the POC branch into the default branch. The solution must meet the technical requirements.
Which command should you run?



The commit history of the POC branch must replace the history of the default branch.
Rebasing is the process of moving or combining a sequence of commits to a new base commit. Rebasing is most useful and easily visualized in the context of a feature branching workflow. The general process can be visualized as the following:
AZ-400_395E.jpg related to the Microsoft AZ-400 Exam
Note: The primary reason for rebasing is to maintain a linear project history. For example, consider a situation where the main branch has progressed since you started working on a feature branch. You want to get the latest updates to the main branch in your feature branch, but you want to keep your branch's history clean so it appears as if you've been working off the latest main branch. This gives the later benefit of a clean merge of your feature branch back into the main branch. Why do we want to maintain a "clean history"? The benefits of having a clean history become tangible when performing Git operations to investigate the introduction of a regression.
Incorrect:
Not B: git-merge - Join two or more development histories together.
Squash merging is a merge option that allows you to condense the Git history of topic branches when you complete a pull request. Instead of each commit on the topic branch being added to the history of the default branch, a squash merge adds all the file changes to a single new commit on the default branch.
Not D: git merge --allow-unrelated-histories
By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives independently. As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added.
Reference:
https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase





Previous Questions Next Questions