Forums

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

Requesting git gc for remote repo.

pinturic
February 17, 2026

Good morning, 

 

I have recently rewritten the history of my repository in order to remove a lot of blob files that should have never been there.

 

Locally my repository went from 700Mb to 45Mb and after a push force I hoped the server repository size were going down as well. Maybe you have to trigger a manual gc as well!

 

The repository is TheForgottenBelow

 

4 answers

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2026

Hi @pinturic 

I've executed a gc against the repo, it has only reduced from 775MB > 760MB unfortunately.

This is usually due to one of the following 2 causes:

1. Large files are still present

  • Double check your large files:
    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
  • If you see a number of large files still present - target these for removal and force push again:
    https://support.atlassian.com/bitbucket-cloud/docs/maintain-a-git-repository/ 

2. Pull requests

  • Pull requests cache the size of those historical large binary files, this is to speed up the calculation of complex diffs. 
  • You can test this by performing a clone locally and checking the size of the cloned repo on your machine - if the size differs massively - this will be the cause (as PR's are metadata which aren't included in clones)
  • The simplest way of resolving this would be to mirror clone your repo, push a copy to a new blank repo in your workspace and delete the original:
    https://support.atlassian.com/bitbucket-cloud/kb/how-to-duplicate-a-bitbucket-cloud-repository/ 

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

 

0 votes
pinturic
March 2, 2026

Thanks I cloned the repository!

0 votes
pinturic
February 26, 2026

I am waiting for the garbage collection, are there news?

0 votes
pinturic
February 21, 2026

Can anyone help me?

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