gitcontinuous-integrationvnext

When to use shallow fetch different from 1


I see the idea to use Shallow Fetch when getting source in a CI build, as it only get the latest revision of every file.

But I'm more in doubt when to have several revisions.

When do you use Shallow Fetch > 1 or not using it at all?


Solution

  • When do you use Shallow Fetch > 1 or not using it at all?

    When you need the history topology to do the thing you want to do in your build.

    For example, some use git describe or calculate the numbers of commit since the last tag to generate a semantic versioning version number.