Skip to content

Support sparse checkout (similar to native Git) #226

@fayez-ab

Description

@fayez-ab

Description

JGit currently cannot perform sparse checkout, a feature in native Git that allows checking out only selected subdirectories of a repository. (https://git-scm.com/docs/git-sparse-checkout)
Although JGit’s checkout().addPath() enables partial file checkouts once, it doesn’t persist sparse patterns or maintain the skip-worktree state in the index.
As a result, every checkout re-populates the full working tree, which defeats the purpose of selective checkouts.

Motivation

This limitation makes it difficult to work efficiently with large repositories, where only specific components are needed.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions