The task gives you an easy way to standardise your versioning.
In the pipeline of choice, you add the Task over the Task assistant by either entering the name in the search window or manually searching for the task.
When added, there should be a new task in the steps-section which is the GitDateVersion.
The task doesn't require any further inputs and should be in the steps higher than the task you want to use its variables.
During the build, it will install the Nuget-Package GitDateVersion which handles the creation of the Version-Number and the Nuget-Version-Number.
After adding it, there will be two variables available:
[Year].[Month].[Day].[Seconds]-[Branch] for branches
These variables can futher be used, for example in the build-pipeline.
The following image shows a potential use case of the GitDateVersion:
While running the pipeline, in the Jobs-section the GitDateVsion will provide some addition information: