Fixing Git issues caused by shallow fetch in Azure DevOps Pipelines - Update

Update to my previous post...

An issue has been logged on Microsoft's Developer Community forum: checkout step adds --depth=1 even if not specified in the yaml

In lieu of a fix, the advice is to specify a fetchDepth of 0:

Comments