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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

My Bitbucket repository is too large

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 Feb 08, 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,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events