3 ms·
Git GC won't do anything here unless you're deleting commits or resetting the repo constantly. Every commit will keep piling up, and you will never prune anyth
by candiddevmike 6y ago
Git GC won't do anything here unless you're deleting commits or resetting the repo constantly. Every commit will keep piling up, and you will never prune anything like you would a traditional backup tool. The day you do decide to start pruning things, expect your computer to burst into flames as it struggles to rewrite the commit history!
Using a real database backup solution isn't a premature optimization, it's basic system administration.
- danmur 6y agoAgree. Nothing wrong with doing what works for most things, but with backups it's easier to use an appropriate process from the start. It's easy enough and saves you grief later.
- deleted 6y ago[deleted]
- john_moscow 6y agoI haven't dug into too much detail, but doing git gc did have a noticeable effect on size and subsequent update performance. I assume, some temporary artifacts got consolidated. Also resetting the repository once every 1-2 years, and keeping the old one for a while is fine for smaller setups. Depending on your business size and the amount of resources you want to allocate towards "basic system administration", accomplishing the same task with fewer tools could have its advantages.
- Izkata 6y agoThere wouldn't be anything to prune, but git gc also does compression.