Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

PLease run git gc

Vincent Crete June 3, 2025

Hello,

It seems we got over the free limit of 1Gb. We deleted some old repositories and deleted some branches on our two main repositories. As per Theodora Boudale said on this post: https://community.atlassian.com/forums/Bitbucket-questions/Repository-size-exceeds-limit/qaq-p/2999788, we humbly ask someone on Atlassian Team to run git gc on our account.

Thank you.

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2025

Hi @Vincent Crete

Welcome to the community.

Could you provide those repository sizes that you'd like us to run GC?

Regards,
Mark C

Vincent Crete June 4, 2025

Hi Mark,

These two repositories have several branches deleted so the size should be reduced:
fodmap repository - 371.2 MB
symfony-application repository - 661.3 MB

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2025

Hi @Vincent Crete

I've run Git GC for those repos, however, the size remains the same.

Could you please try to reduce the repos by using the BFG tool to remove large files? - https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/

Let me know once done so that I can run Git GC again.

Regards,
Mark C

Vincent Crete June 5, 2025

Hi Mark, 

Doesn't deleting branches should reduce sizes? We deleted around 8 branches, it should have reduce at least a bit.

We ran git rm to remove over 600Mb of files. But we can't push the commits because it is read-only. The BFG tool also use git push. So how can-we push the deletion?

Thank you for your time,

Vincent

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2025

Hi @Vincent Crete

Unfortunately, the size remains the same after running Git GC again for those repos.

For that, you have a couple of options to resolve this:

Option 1 - Delete & recreate the repositories
This is the fastest way to solve the problem, but loses metadata such as PRs, Pipelines, Permissions, etc.

  1. Perform a clone of those repositories for backup purposes

  1. Delete those repositories from your workspace to free up space and allow you to push. NOTE: This will permanently remove metadata such as PR's/pipelines/user permissions etc.

  1. Identify the largest files in your repositories by executing the following command:

git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \| awk '/^blob/ {print substr($0,6)}' \
| sort -r --numeric-sort --key=2 \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

  1. Perform cleanup operations locally to reduce the size

  1. Once complete, push those repositories back to your workspace by creating a blank repository with the same name of the deleted repository, then mirror pushing the contents of the cleaned repository:


HTTPS
git push --mirror https://<username>@bitbucket.org/<WorkspaceID>/<RepoName>.git
SSH
git push --mirror git@bitbucket.org:<WorkspaceID>/<RepoName>.git

NOTE: This will remove metadata such as PR's/pipelines/permissions etc but will keep your commit history and binary files intact.

Option 2 - Temporarily upgrade

  1. Upgrade to a paid plan and utilise our 30-day trial period to restore functionality and provide more time to reduce your repository directly without deletion. You can choose to continue or cease your trial before the end of the 30-day period.

  1. If you encounter any issues during this period - you may raise a ticket directly with our support team using your workspace URL: Atlassian Support  

Please let me know how this goes.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events