Forums

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

How can I clean large file history in repository and request to trigger GC on bitbucket repository

preeda_wap
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!
September 29, 2023

I have 2 test repositories to clean large files that were committed and would like to request to manually trigger GC for these repositories

First, I use git-filter-repo to remove unwanted files from the repository.

git filter-repo --path-glob '*.bundle' --invert-paths
git push --force origin --all

All '*.bundle' files have been removed from the repository but after I forced push changes into the git occupied storage increased from ~400MB to ~700MB which I assume is temporary until the GC trigger.
https://bitbucket.org/<workspaceID>/repo-4

Seconds, I follow this document https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/ to use BFG to convert files{.pdf and .bundle} to LFS.


java -jar bfg-1.14.0.jar --convert-to-git-lfs "*.{bundle,pdf}" --no-blob-protection .
git push --force

Same as the first repo, after force push the occupied storage increased from ~400MB to ~700MB. The LFS size doesn't seem to increase by the size of files I convert to LFS by the command above.
https://bitbucket.org/<workspaceID>/repo-5

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.
September 29, 2023

Hi @preeda_wap and welcome to the community!

I ran a git gc for both repos and their size has been reduced.

If you ever need a git gc again, you can either create a new question in community or (since the workspace is on a paid billing plan) you can also create a ticket with the support team via https://support.atlassian.com/contact/#/. In "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Just a heads up, I edited the repo names from your post as well to protect your privacy.

Please feel free to reach out if you have any questions.

Kind regards,
Theodora

preeda_wap
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!
October 1, 2023

Thank you for your help

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2023

You are very welcome, please feel free to reach out if you ever need anything else!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events