Can I achieve the result of git clone --depth=1
on a local already cloned repo which has all history while the aim is to keep all the ignored files in place?
I have several git projects consuming lots of space and I would like to remove all git history to release some space. Thanks.
UPDATE
To be more precise:
- I don't want to do any manual work with moving files here and there, deleting repo, recreate, etc
- I have some config files in
assume-unchanged
state which must be kept - I have many gitignored files which must be left in place
These reasons can make it clear why I don't want to re-clone and set up all credentials and stuff on 30 repos.
Ideally I'm looking for something I could even run in batch on all project. If there's no such thing, then I'm fine with it of course.