Skip to content

Instantly share code, notes, and snippets.

@michaldabrowski
Last active May 15, 2017 12:34
Show Gist options
  • Save michaldabrowski/5b5ec4428b79aa18374eb6dbfa596193 to your computer and use it in GitHub Desktop.
Save michaldabrowski/5b5ec4428b79aa18374eb6dbfa596193 to your computer and use it in GitHub Desktop.

Git sparsecheckout

  • git init

  • git remote add -f origin git@repo:company/project.git

  • git config core.sparsecheckout true

Enables sparse checkout

  • echo example_folder > .git/info/sparse-checkout

Marks example_folder dir as a part of sparse checkout

  • git pull origin master

Fetches only example_folder from origin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment