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

My Bitbucket repository is too large

Nina Lanyon February 7, 2022

I am using the repository as the source for netlify.  Everything in the repository is generated by a script so I do not need any history.

So I have two questions:

- how can I remove everything except the current version of every file?

- Is it possible to prevent git from storing versions.

I have tried just deleting and reinitialising the local repository and doing git push --force but it made no difference to the remote.

1 answer

1 accepted

0 votes
Answer accepted
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2022

Hi, @Nina Lanyon, welcome to the community! 

I found a repository under your workspace that was over 3 GB, so I ran the GC against this repo and managed to reduce its size. Just to give you some context around the reason your repo size didn’t change after you deleted some files and pushed it, the remote repo still had the old references as well, so the GC is required on the remote repository to clean up any old references you have removed. 

Answering your question about how to remove everything except the current version of every file, I recommend that you use BFG Repo-Cleaner to achieve that. The following documentation has a very good explanation on how to proceed with that:

I also would like to share with you that we have a feature request to allow users to mark repositories for git GC, as you can check here:

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it here.

Feel free to share any additional questions or concerns regarding this case.

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events