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

Easiest path to reducing the size of a repository?


Hi, I've hit the 4GB limit with my repository and am seeking a path to reduce that size while ensuring that my most recent changes are safe.

In going through the documentation steps ( I have done the following:

- Created a temporary branch with my latest commit

- Reset my master branch back to the previous commit

However at this stage I am uncertain how to proceed with reducing my repository size so I can continue making changes. My older changes do not matter to me, it is just important that my most recent commits are backed up. Is there a way to clear my data prior to a provided commit or something along those lines?


2 answers

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.
Oct 19, 2022

Hi @MrConkin,

You mentioned that you started with a new repo without the history and abandoned the old one.

In case you would like to continue with the old repo with the history, I can see the repo that was over the 4 GB size limit. I ran a garbage collection to this repo and its size is 2.8 GB now, so you should be able to push to the repo.

The repo's size is still quite large, so I would suggest reducing it further, if possible. You can check this reply of mine here:

If you decide to rewrite history with BFG to further reduce the repo's size, please keep in mind that the repo's size will get increased again when you push these changes, and the remote repo will need another git gc. I can run it for your repo again then, so that the repo's size gets reduced, just let me know.

Kind regards,

That's very helpful, thank you Theodora. I think I will stick with the new repo so I can start fresh with a stringent gitignore. Appreciate the help and offer though.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 21, 2022

You are very welcome. If you change your mind or if you have any other questions in the future, please feel free to reach out!

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 16, 2022

You might have a look at following solution:

How to push a shallow clone to a new repo? 

Hi Johannes, thanks for the lead.

That process was going relatively smoothly. I created a shallow clone and a new BitBucket repo, but when I attempt to push the clone to the new repo I get this error. Any advice on how to bypass this would be appreciated.


Abandoned that plan and ended up just starting fresh with my latest in a new repo as per:

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events