GNU+Linux command memo

Save Git space

Réduire l’espace de stockage utilisé par Git.

Short on disk space ? Using Git?

$ du -sh .git && git gc --aggressive && du -sh .git (1)
$ git fetch --all --prune (2)
1 Compress the repository and see how much it worked
2 Drop all removed upstream branches
It needs some available disk space and a lot of CPU & RAM to do this.

Thanks to for the tip.