ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 58 - AZ-400 discussion

Report
Export

Your company uses a Get repository in Azure Repos to manage the source code of a web application. The master branch is protected from direct updates. Developers work on new features in the topic branches.

Because of the high volume of requested features, it is difficult to follow the history of the changes to the master branch.

You need to enforce a pull request merge strategy. The strategy must meet the following requirements:

Consolidate commit histories.

Merge the changes into a single commit.

Which merge strategy should you use in the branch policy?

A.
squash merge
Answers
A.
squash merge
B.
fast-forward merge
Answers
B.
fast-forward merge
C.
Get fetch
Answers
C.
Get fetch
D.
no-fast-forward merge
Answers
D.
no-fast-forward merge
Suggested answer: A

Explanation:

Squash merging is a merge option that allows you to condense the Get 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 takes all the file changes and adds them to a single new commit on the default branch.

A simple way to think about this is that squash merge gives you just the file changes, and a regular merge gives you the file changes and the commit history. Note: Squash merging keeps your default branch histories clean and easy to follow without demanding any workflow changes on your team. Contributors to the topic branch work how they want in the topic branch, and the default branches keep a linear history through the use of squash merges. The commit history of a master branch updated with squash merges will have one commit for each merged branch. You can step through this history commit by commit to find out exactly when work was done.

Reference:

https://docs.microsoft.com/en-us/azure/devops/repos/git/merging-with-squash

asked 02/10/2024
Ernesto Barba
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first