Optimize your .gitMon Nov 28, 2016
Surprised by that, I started looking around1 if there was a way to
optimize the cloned git repositories i.e. the
.git/ directories. And
sure enough, there was a way.
From this SO solution, all I needed to do was run the below in the git repo directory.
git reflog expire --all --expire=now git gc --prune=now --aggressive
After running the above, the
org-mode git repo shrunk down to 68MB!
I will find myself needing this for various git projects. So I created
an alias called
git_optimize for my
alias git_optimize 'git reflog expire --all --expire=now; \\ git gc --prune=now --aggressive'
- I mean, started googling :) [return]