Hi Team Atlassian,
I have cleaned my repository from local through bfg and pushed on the server. Can you please run gc on these repos:
git@bitbucket.org:<redacted>.git and
git@bitbucket.org:<redacted>.git
Thanks,
Sumeet Kumar
Hello @Sumeet.d.kumar ,
thank you for reaching out!
I have executed a GC on both the repositories you shared, and the size was reduced from about ~2.6GB to ~2.4GB.
As the size didn't reduce much, I would suggest using the following command to list the top 50 largest files in the repo, and use BFG to either delete those files or move them to LFS to further reduce the repository size :
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| tail -n 50 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
Thank you, @Sumeet.d.kumar !
Patrik S
Hi @Patrik S ,
Does having too many branches also increase the bitbucket repo size? Currently, we have around 4000 branches on my repo. Will cleaning the unused branches help me significantly in reducing the bitbucket repo size?
Thanks,
Sumeet Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patrik S ,
I used BFG Repo-Cleaner to delete some files from my Git repository. After running 'git reflog expire --expire=now --all && git gc --prune=now --aggressive'
to perform garbage collection, I still see some same files when I run the `git rev-list --objects --all` command. Is this expected behavior? What steps should I take to ensure these files are completely removed from the repository history?
Thanks,
Sumeet Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Sumeet.d.kumar ,
After the deletion with BFG and the local GC, the files should now show up in the git-rev-list command.
Could you please confirm if you followed the steps outlined in the below article when deleting those files?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patrik S ,
Yes, I followed the similar steps. Apart from point 2, I did the same. For file names, I gave wildcard names like abc-*.tgz. For some of the files which got deleted, it is not coming in the git-rev-list command. However, for others, it does show.
What steps can I follow apart from this?
Thanks,
Sumeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sumeet.d.kumar ,
The steps outlined in that article should work for removing the files. I see you have access to a workspace with an active Bitbucket subscription that is entitled to standard support, so to investigate this further, I will be raising a support ticket for you using the same email used to post this question
You should be receiving the support link soon, but in case you don't, please let me know so I can share it with you here (only you and Atlassian staff can access it).
Thank you, @Sumeet.d.kumar !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.