git gc
du -hs .
# 664 MB in about 20 secondsOr if you have time you can use aggresive GC, like this:
git gc --aggressive
du -hs .
# 217 MB in about 5 minutes
Or if you do not need any old history, you can clone then replace, like this:
Or if you do not need any old history, you can clone then replace, like this:
git clone --mirror --depth=5 file://$PWD ../temp
rm -rf .git/objects
mv ../temp/{shallow,objects} .git
rm -rf ../temp
# 150 MB in about 2 seconds
Next you can reclaim space from docker using this command:
sudo docker system prune -a -f
docker system df
docker system df
For more disk usage analysis you can use baobab for linux or windirstat on windows.
No comments:
Post a Comment
THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?