File versioning based on shallow Git repositories?
- Date: Thu, 12 Apr 2018 20:01:15 +0200
- From: Hallvard Breien Furuseth <h.b.furuseth@xxxxxxxxxxx>
- Subject: File versioning based on shallow Git repositories?
Can I use a shallow Git repo for file versioning, and regularly purge
history older than e.g. 2 weeks? Purged data MUST NOT be recoverable.
Or is there a backup tool based on shallow Git cloning which does this?
Push/pull to another shallow repo would be nice but is not required.
The files are text files up to 1/4 Gb, usually with few changes.
If using Git - I see "git fetch --depth" can shorten history now.
How do I do that without 'fetch', in the origin repo?
Also Documentation/technical/shallow.txt describes some caveats, I'm
not sure how relevant they are.
To purge old data -
git config core.logallrefupdates false
git gc --prune=now --aggressive
I'm guessing that without --aggressive, some expired info might be
deduced from studying the packing of the remaining objects. Don't
know if we'll be required to be that paranoid.