Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save delputnam/3f1f848eecaaa2f694c5812346e0d44a to your computer and use it in GitHub Desktop.
Save delputnam/3f1f848eecaaa2f694c5812346e0d44a to your computer and use it in GitHub Desktop.
mkdir repo_name
cd repo_name
git init
git remote add origin git@github.com:username/repo_name.git
git config core.sparsecheckout true
echo "dir_to_clone/*" >> .git/info/sparse-checkout
git pull origin master
@delputnam
Copy link
Author

If you don't need all the history, add --depth=1 to pull only the latest commit.

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