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?
Needed to go through support as indicated by @phd, nothing to do on my own. Sharing the Reply from Support In case it helps someone at some point:
Large files of a total size of 4.3 GB are preserved as part of dark references. we preserve them due to the recent changes made in the PR diff view (https://bitbucket.org/blog/improving-performance-on-complex-diffs).
These cannot be deleted with a GC run, we need to manually delete the PRs and the file will be deleted and then the repository size will reduce.
Please provide your approval so that we can go ahead and delete the pull requests, which should reduce the repository size.
You can export the pull request data using API before we delete them. API: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-get
You can also use the below python script to export all your PRs.