Skip to content

Instantly share code, notes, and snippets.

@ssghost
Last active August 12, 2025 06:36
Show Gist options
  • Save ssghost/8ec81d084d9c5d2f936fdf0ee493a425 to your computer and use it in GitHub Desktop.
Save ssghost/8ec81d084d9c5d2f936fdf0ee493a425 to your computer and use it in GitHub Desktop.
Partial clone Github repo data folder
!mkdir my_data
%cd my_data
!git init
!git remote add origin https://github.com/username/reponame.git
!git config core.sparsecheckout true
!echo "tests/data" >> .git/info/sparse-checkout
!git pull origin master # or 'main/trunk/...'
%cd /content/
!ls my_data/tests/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment