1. Resources
  2. /
  3. Changelog
  4. /
  5. Customize Git checkout behavior directly in pipeline YAML

Customize Git checkout behavior directly in pipeline YAML

You can now configure how the Buildkite agent checks out your source code using a new checkout block in your pipeline YAML. Skip checkout entirely, perform shallow clones, set custom Git flags, and more - all from within your pipeline definition. For example:

checkout:
  submodules: false

steps:
  - label: "Fast build"
    command: "make build"
    checkout:
      depth: 50
      sparse:
        paths:
          - src/
          - .buildkite/

  - label: "Full integration tests"
    command: "make integration"
    checkout:
      submodules: true

The checkout block can be set at both the pipeline level (as a default for all steps) and the step level (to override per step). Previously, customizing checkout behavior required using plugins like Sparse Checkout, Custom Checkout, or Skip Checkout, or setting BUILDKITE_GIT_* environment variables. The native checkout block replaces most of these patterns with a cleaner configuration surface built into the agent.

This feature requires Buildkite Agent v3.136.0 or newer. For the full list of available options, see the Git checkout documentation.

Owen

Atom feed

Start turning complexity into an advantage

Create an account to get started for free.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Public pipelines
  3. Test Engine
  4. Package Registries
  5. Mobile Delivery Cloud
  6. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Example pipelines
  5. Plugins
  6. Webinars
  7. Case studies
  8. Events
  9. Migration Services
  10. CI/CD perspectives

Company

  1. About
  2. Careers
  3. Press
  4. Security
  5. Brand assets
  6. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for MLOps
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement
  6. Supplier Code of Conduct
  7. Modern Slavery Statement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2026