Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I 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.


Agree. 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.


There wouldn't be anything to prune, but git gc also does compression.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: