Interview Prep/Git & GitHub/GitHub features, history rewriting and scale

What is the difference between `git gc --aggressive` and `git repack -adf`?

AdvancedConceptGitHub features, history rewriting and scale
Answer

gc --aggressive uses expensive repack options (--depth=50 --window=250 and recomputes deltas) and rarely pays off on a regular basis. repack -a -d -f repacks everything into one pack and discards old pack deltas; add depth and window to tune. Both are heavy; for routine upkeep use git maintenance.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub features, history rewriting and scale