Git Partial Clone Now Supported in Azure DevOps

Michael Carlson

Git Partial Clone

Treeless and blobless Git Partial Clones are now enabled in Azure DevOps for all customers! Partial clones are a reduced type of git clone that users create via specific arguments on the git command line. For large repositories with a lot of history, they offer a dramatic performance improvement compared to a regular clone, with some tradeoffs. Partial clones do not download every single historical object in the repository at clone time like a traditional clone. Instead, they delay downloading many objects until checkout of a branch (or other git scenario) that needs them. Those who want a deeper understanding of what blob and tree objects are and what this tradeoff means should read this GitHub blog post.

How To Use

This feature ONLY affects git clones/fetches that pass these arguments. Blob size limits are not yet supported, and attempting to specify those will result in the clone request failing at this time. These are the supported commands:

Blobless clones: git clone --filter=blob:none <url>

Treeless clones: git clone --filter=tree:0 <url>

Performance Benefit

Partial clones show a large performance benefit over traditional clones, benefitting large repositories the most. We’re seeing an average 88.6% reduction in clone time in repositories where it’s used. The very largest of those repositories enjoy a >99% reduction in clone time.

Many build pipelines may see a speed benefit from using partial clone. Also, partial clone is suitable for developer machines that need a fast clone, or need to prioritize disk space.

Partial != Shallow

At first glance this feature may seem similar to the shallow clone feature git clone --depth=1 <url>, which Azure DevOps already supported. Although shallow clones are even faster than partial clones, they leave the user with a flattened git commit history with commit history only up to a certain point, and no awareness of history before that. Therefore, shallow clones are typically used in specific scenarios such as a build pipeline that doesn’t look at history.


Discussion is closed. Login to edit/delete existing comments.

  • Brian Baker 1

    Can pipelines that use git-based artifacts utilize partial cloning?

    • Michael CarlsonMicrosoft employee 2

      Pipelines that specify git commandline manually can use it today. For more intuitive use within pipelines, we are investigating improving this.

  • Georgi Hadzhigeorgiev 0

    That’s cool, thanks!

  • Emil Eriksson 0

    Hi! I have a question. How about this git clone partial feature. Does this nice feature works now in azure devops server 2022 as well? Do I need to patch my the server to newer version of azure devops server ?

    Best regards
    Devops engineer

    • Michael CarlsonMicrosoft employee 2

      This is not yet in Azure DevOps Server. We are exploring shipping this in a future Server release.

Feedback usabilla icon