Forums

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

Request for git gc on repo

TebbuttTW March 27, 2025

The repo name is "Panel". Showing > 1.1GB on bitbucket, but only a few MB is visible in the tree.

1 answer

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

Hi,

 
I've successfully run garbage collection against your remote repository in the back-end to clean up any dangling commits.

The repository size has not reduced, however.

I'd suggest executing the following command to view the largest files stored in your git commit history:

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 you have this list - please follow our documentation to reduce the size of your repository. I would recommend making use of The BFG Tool which is described here under the *"Removing Large Files"* heading to convert existing files to GIT LFS so that these may be stored outside of your repository and therefore reduce the repository size:
https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/

You can also simply reduce the size by deleting those file extensions from your repository altogether if they are not needed, please refer to the BFG documentation below with an example command:

Let me know how this goes - once ready I can execute a subsequent gc on the server end.

Cheers!

- Ben (Bitbucket Cloud Support)

 

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