Forums

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

Unable to reduce my repository size

raubel
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!
April 4, 2025

Hello,

I tried to reduce the size of my repository (m*w***g***) by removing some large files from the history (using 'git filter-branch'), but it didn't reduce on the server.

Looking at other messages from the community, it looks like a 'git gc' needs to be run on Bitbucket side.

Can someone do that?

Thanks in advance,

Rémi

1 answer

0 votes
Brant Schroeder
Community Champion
April 4, 2025

@raubel welcome to the Atlassian community

I have escalated to Atlassian so they can run garbage collection.

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2025 edited

Hi @raubel 

I have executed a garbage collection on the server-side to clear out the dangling commits created by your cleanup operations. This has reduced the size down from 1900MB to 900MB.

Your workspace is currently sitting at 1.0GB, so I'd recommend performing further maintenance by checking for large files and removing them - the below command will print all large files in your repo:

  • 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

Once complete, please let me know and I'll perform a subsequent gc.

Cheers!

- Ben (Bitbucket Cloud Support)

Like • Brant Schroeder likes this
raubel
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!
April 9, 2025

Hi @Ben,

Thank you very much.

Indeed, I've removed more files. You can proceed with a new gc anytime.

Thanks again,

Rémi

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