ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 462 - AZ-400 discussion

Report
Export

SIMULATION

Task 6

Initialize the default main branch, if it does not exist already.

For Project 1, you need to implement branch merging restrictions to enable squash merge for all changes merged into the main branch.

A.
See the solution below in explanation
Answers
A.
See the solution below in explanation
Suggested answer: A

Explanation:

Step 1: Initialize the Default Main Branch

Navigate to Azure DevOps:

Go to Azure DevOps and sign in with your credentials.

Select Your Project:

ChooseProject1from your list of projects.

Initialize the Main Branch:

Go toRepos>Files.

If the main branch does not exist, you will see an option to initialize it.Click onInitializeand follow the prompts to create the main branch1.

Step 2: Enable Squash Merge for the Main Branch

Navigate to Branch Policies:

Go toRepos>Branches.

Find themainbranch and click on the...(ellipsis) next to it.

SelectBranch policies.

Enable Squash Merge:

UnderPolicies, scroll down to theMerge strategysection.

SelectSquash mergeas the required merge strategy2.

Save Changes:

Click onSave changesto apply the policies.

Step 3: Verify the Squash Merge Policy

Create a Pull Request:

Make a change in a branch and create a pull request to merge it into the main branch.

Complete the Pull Request:

Ensure that the pull request uses the squash merge strategy by selectingSquash commitunder theMerge typein the Complete pull request dialog

asked 02/10/2024
Ioana Mihaila
49 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first