Azure Repos is the portion of Azure DevOps and Azure DevOps Server that houses repositories. Following recent updates to Azure DevOps, two of the most community-requested Git features are now supported: rebase with pull request and semi-linear merging.

Rebase with Pull Request

A rebase allows the integration of a pull request branch into the master branch. That is, the contents of each commit on the pull request branch are brought over to the master branch individually. The advantage of this is that it works even when you’re not ahead of the master branch, such as when someone else has pushed changes to it. The rebase with pull request operation results in a linear history, like in a fast-forward merge. However, it allows for greater flexibility when bringing in new changes. The following gif from the Azure DevOps Blog gives a concrete visualization of this process.

Semi-Linear Merging

A semi-linear merge is also known as “rebase and merge.” With this type of merge, a merge commit is created but merging is only allowed if the branch has been rebased. The advantage of this is a history that reads linearly, with the addition of merge commits.

The following graphic from GitHub gives a way to visualize the difference between a merge, rebase and merge linearly, and rebase and merge semi-linearly.

Both rebase and semi-linear merging are available in the Complete Pull Request dialog in Azure DevOps. Furthermore, the policy administration page has been updated to allow administrators to control which strategies are allowed.

If you need any help with GIT branching, contact our team at PRAKTIK and we can help you decide on the best branching strategy.