Forums

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

I need a git gc --prune=now on my repository

Agent009
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 1, 2025

When running `git count-objects -vH`, my repo is 40MB in size.

 

size-pack: 40.47 MiB

But shows up as **921.88 MB** in bitbucket.

1 answer

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

Hi Agent009,

I've just conducted a gc against that repository which has brought the size down from 921.9MB to 658.1MB.

Your workspace total size is now within the limit of 1GB (which will be enforced April 28th) at 891MB. 

If you'd like to reduce the size further - I'd suggest taking a look at any large files in your repositories and performing cleanup operations on these.

Command to find 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

Repo cleanup documentation:

Note that after cleanup operations your repository is likely to increase in size due to accumulated garbage. We will need to perform a subsequent garbage collection on the server-side to remove that garbage and reduce the size further.

Cheers!

- Ben (Bitbucket Cloud Support)

898.4 MB active FS consumed

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