Forums

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

Large repo size

genesyswebteam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 23, 2026

One of my repo got notified became too large on 3.1GB

Already delete big files on some of my branch some time ago

Still got that notififcation

It make me cannot branching and push another new branch

2 answers

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2026

Hi @genesyswebteam 

I've just executed a garbage collection on the server end, it reduced the repo size from 3.1GB > 799MB.

I can see your workspace is still 17GB in total, and is on a Free plan. Free plan's are limited to 1GB total workspace size, so you will still be blocked from pushing.

I would suggest considering upgrading to a paid plan (even just for the trial period) to allow you to effectively perform repository cleanup to reduce the total repo size.

Kind Regards,

- Ben (Bitbucket Cloud Support)

0 votes
Simon_NGPILOT_
Atlassian Partner
July 23, 2026

The reason you're still seeing that notification is that deleting files in a normal commit doesn't actually shrink the repository. Git is designed to keep every version of every file forever, so those large blobs are still sitting inside your history — they're just no longer referenced by your current branch. Your 3.1 GB is almost certainly made up of old objects that earlier commits, tags, or other branches still point to.

Here's how to bring the size down properly.

1. Find what's really taking up the space

Clone a bare/mirror copy locally so you can inspect the full history without affecting your working repo:

git clone --mirror https://bitbucket.org/<workspace>/<repo>.git
cd <repo>.git

Then list the largest objects across all of history:

git rev-list --objects --all \
  | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
  | awk '/^blob/ {print $3, $4}' \
  | sort -n \
  | tail -30

This shows the biggest files (by size and path) hiding in your history — usually build artefacts, videos, datasets, or dependencies that got committed by accident.

2. Purge them with git filter-repo

git filter-repo is the currently recommended tool (it replaces the old git filter-branch and BFG):

# Install once
pip install git-filter-repo

# Remove every blob larger than a threshold
git filter-repo --strip-blobs-bigger-than 10M

# ...or remove specific paths
git filter-repo --path path/to/big/file --invert-paths

⚠️ Rewriting history changes every commit hash from the rewrite point onwards. It's destructive, so coordinate with your team first and make sure you have a backup.

3. Force-push the rewritten history back

git push --force --mirror

Because you cloned with --mirror, this overwrites all branches and tags in one push. Bitbucket Cloud runs garbage collection on its side automatically (there's no manual GC button on Cloud), and your reported size should drop shortly after.

4. Have everyone re-clone

After a history rewrite, anyone with a clone must delete it and re-clone. A normal git pull won't help — they'll just pull the old objects back in and re-inflate the repo. The same applies to any CI/CD pipelines that cache the repo.

5. Stop it happening again

For large binary assets (videos, datasets, build outputs), switch to Git LFS — it stores the big files outside the Git object database so they never bloat history again. Bitbucket Cloud supports LFS on Standard and above plans.

A couple of things worth noting

  • Deleting big files on one branch won't reduce the repo size if other branches or tags still reference them — history is shared across the whole repository, not per-branch.
  • The soft limit Atlassian warns at is around 1–2 GB; once you're over ~5 GB you can start hitting push/pull and performance problems.
  • If you'd rather use a JAR-based tool, BFG Repo-Cleaner is a friendly alternative to git filter-repo.

Hope that gets you unblocked!

Suggest an answer

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

Atlassian Community Events