Reducing History Volume in Azure DevOps with Fast-Forward Merges

Implementing a Pull Request Strategy with Fast-Forward Merges

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

Your company uses Azure DevOps to manage the build and release processes for applications.

You use a Git repository for applications source control.

You need to implement a pull request strategy that reduces the history volume in the master branch.

Solution: You implement a pull request strategy that uses fast-forward merges.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

A

No fast-forward merge - This option merges the commit history of the source branch when the pull request closes and creates a merge commit in the target branch.

https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies

The solution proposed in the scenario, implementing a pull request strategy that uses fast-forward merges, does not meet the goal of reducing history volume in the master branch.

Fast-forward merge is a type of merge where the changes in the branch to be merged can be applied directly to the master branch without creating a new commit. This type of merge is possible when there are no changes in the master branch since the branch was created. However, if changes have been made in the master branch, a new commit is created, and the branch is merged into the master branch.

While fast-forward merges can simplify the branch history, they do not reduce the volume of the history in the master branch. Therefore, the proposed solution is not the correct one to achieve the goal.

An alternative solution to reduce history volume in the master branch is to use a rebase strategy when merging a feature branch into the master branch. A rebase strategy replays the changes in the feature branch on top of the master branch, creating a new commit that incorporates all the changes. This approach creates a more linear and simplified branch history, reducing the number of merge commits in the master branch.

In conclusion, the proposed solution does not meet the goal of reducing history volume in the master branch, and a rebase strategy could be a better alternative.