Cleaning private repo history:
$ git gc
$ git filter-repo --replace-refs delete-no-add --strip-blobs-bigger-than $ 10M
$ git reflog expire --expire=now --all
$ git gc --aggressive --prune=now
$ git commit
$ git push origin master --force
du -sh .git returns 2 GB before and 25 MB after the operation, but the size on bitbucket remains 2GB
when I git clone --mirror repo.git the folder repo.git is also 25MB
Questions:
- What am I doing wrong?
- What is the size difference between local and remote repo?
First of all you have to know what is the actual size of your repository.
This displays your repository size. Use this to forecefully push to master and rewrite the history
Git stores every commit, every file related and then overhead data.