How to use git clone to set up the repo without downloading files?
01:46 22 Apr 2020

To manage yarn workspaces I am copying the pertinent subfolders into temporary folders and push them into their respective git repositories

To setup these repositories I am using git clone, which downloads everything and sets up the origin and remote configuration (and then copy files)

Can I skip the downloading of the repo folders?

Would this work?

git clone --filter=blob:none --no-checkout 

EDIT

The usual way would be (as said by @edd34 and @pallgeuer below) with git init and remote add origin, but with the git clone above is only one line

-> what are the differences? What is achieved with this approach? And if incorrect, is there any way to get the same (provided a remote already exists) with git clone?

git git-clone git-filter