Forums

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

Reduce Repo Size

awe_learning
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!
February 6, 2024

The size of the repo shows more than 2.7 GB.

Could you delete large files from old commit history so size will be decreased  or run git gc for me?

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 6, 2024

Hi @awe_learning 

We do not have access to remove any data from any users repositories, this is as per our security policies concerning the protection of user-generated content.

You will need to follow our guide below to either delete files or move large files to LFS storage:

To check your largest files, you can use a command such as the one below:

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 this has been done, please let us know so we can trigger a gc from the server-side.

Cheers!

- Ben (Bitbucket Cloud Support)

awe_learning
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!
February 8, 2024

But I have two branches
in which there are only 3 files.
I removed one large branch, but the size of the repository did not decrease

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2024

Hi @awe_learning 

For the repository to finish its size reduction, a gc needs to be executed on the server-side. These are performed automatically once certain trash threshholds are met, but in cases where there are only a few files that need to be cleaned up - we run these ourselves to speed up the process and help to get you up and running again :) 

I've just performed a garbage collection on the server-side, this has reduced your repo size from 2.7GB to 46.9KB.

Please clone your repository fresh to avoid the potential for pushing back old refs and inflating the size again.

Hope this helps!

Cheers!

- Ben (Bitbucket Cloud Support)

 

Suggest an answer

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

Atlassian Community Events