I have code files from dozens of git repos in various subfolders under c:\code folder - 16Gb.
I want to migrate this folder to another computer. It's currently taking > 1 day to copy the entire folder to a USB drive, because it is around 650,000 small files.
Is there some script I can run to cleanup all of the repos in my c:\code folder?
CodePudding user response:
You can use git bundle
to bundle each of the repositories full history into one file (per repository)
And you can zip the dozen of bundle into a giant tar file.
Result: only one (big) file to copy, and to untar.
You can then clone back your repositories from their respective bundle (cloning them from their bundle file).
CodePudding user response:
You clone only lasted commit from your remote repository like
git clone --depth 1 https://url-of-your-repo