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?
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?
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?
It looks like you're new here. Sign in or register to get started.