I have a git repository with a bunch of large csv in them, which I don't want to clone, so I came across git sparse-checkout and this post: https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/
From this post I took following:
git clone --no-checkout https://github.com/john_doe/repo-with-big-csv.git
cd repo-with-big-csv
git sparse-checkout init --cone
Then I edit the .git/info/sparse-checkout
and add the following (adapted from example in page above):
/*
!**/*.csv
But it doesn't seem to work properly. After git pull
some folders are cloned, some are not. I also noticed a warning, when I do git sparse-checkout list
I get:
warning: unrecognized pattern: '**/*.csv'
warning: disabling cone pattern matching
/*
!**/*.csv
What's the proper way to ignore a certain file type only?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…