Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Run garbage collection

Aarushi Mehta March 21, 2022

My repository "alive" is touching 3.6 GB on bitbucket, I deleted several files on it using git filter-repo (as recommended by the git project.) Despite pushing the same, size has not reduced, in fact it increased from 3.0 to 3.6GB. On pushing the local cleaned repo to a new remote (aka alive_reduced) the size is down to 200 MB. It is urgent that garbage collection be run server side. I have rewound head and pushed to trigger it automatically (Dangling commits enabled in Labs) but to no avail.

It would be great if the support team could run gc server side.

Regards.

 

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022

Hi @Aarushi Mehta,

I ran a git gc on this repo and its size is 873.1 MB now.

You mentioned that the local cleaned repo is 200 MB. Does this local repo have all branches that the remote does?

Could you try taking a mirror clone of the repo with the command

git clone --mirror <repo_url>

then run the command git count-objects -Hv inside that mirror clone, and let me know what is the output?

The following

I have rewound head and pushed to trigger it automatically (Dangling commits enabled in Labs) but to no avail.

will trigger a garbage collection only if the repo is over the 4 GB limit, which explains why it wasn't triggered for your repo.

We have a feature request to allow users to trigger a git gc for their remote repos:

If you'd be interested in that, I would suggest adding your vote in the feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Kind regards,
Theodora

Aarushi Mehta March 21, 2022

Thank you for addressing this and your explanation!

git count-objects -Hv gives me:
count: 0
size: 0 bytes
in-pack: 11466
packs: 1
size-pack: 234.25 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

It is not as high priority as we ended moving to another repo! Thank you. I have voted on said issue as well

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events