Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git sparse checkout

Using Git Sparse Checkout

Here are the steps to create a “sparse” Git local repository.

  1. Enable Sparse Checkouts

    git config core.sparsecheckout true

  2. Tell Git which directories you want

    echo contrib/completion/ >> .git/info/sparse-checkout

Or you can modify the .git/info/sparse-checkout file directly.

  1. Pull the files

    git pull origin master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.