My local GIT repository became very big and I'm trying to free some hard drive space. I deleted all my old branches and left only the last one. In order to delete branches from my repository, I used the command
git branch -d [my branch name]
The problem is that when I check the repository space usage, it still uses the same amount. Running the garbage collector
git gc
after branches deletion didn't help.
The biggest git repository file is a .pack file inside the .git/objects/pack folder, it takes about 750MB, while the latest branch takes 112MB.
EDIT: I also tried all the
git reflog expire --all --expire=now
git gc --prune=now --aggressive
Neither helped.