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

Hy, I ran BFG over my repo, push all the files I've cloned with '--mirror', when I type 

"git count-objects -v"  I get this 

count: 3
size: 3
in-pack: 1607
packs: 1
size-pack: 68472
prune-packable: 0
garbage: 0
size-garbage: 0

But in BitBucket size information still warning me about the size.

'<repo_name_removed>' is the repo name.

How can this be solved?

1 answer

1 accepted

0 votes
Answer accepted

Hi @Gabriel Hillesheim da Silva and welcome to the community.

I ran a git gc for this remote repository and its size is now 66.5 MB.

Is the warning gone now and is the size updated in the repository settings?

Just a heads up, I removed the repo name from your post for privacy reasons.

Kind regards,


Yes, the repo size is now updated, thank you !! 

When necessary, is it always required to ask to run the git gc? Is there any configuration I can do to run automatically ?


Thank you! 

Have nice day!

Hi Gabriel,

Thank you for the update and you are very welcome, I'm glad to have helped!

There is an automated git gc that runs on every push, however, it runs with different options than the ones used when I manually ran it.

We have a Labs feature "Delete dangling commits when over size limit" that can be found here:

This is useful when the repo goes over the size limit as a result of a large commit that you want to undo. In this case, if the Labs feature is enabled, you can reset to the commit prior to the large one, push to Bitbucket, and a git gc will run which will delete the large files you remove from history when you rewind your branch head. You can read more about this here.

If you rewrite a repo's history with BFG or git filter-branch, you'll need to post a question here and ask that we run a git gc, as the automated one doesn't remove the old references from the repo.

Please feel free to let me know if you have any other questions!

Kind regards,

Hi @Theodora Boudale ,

I want to delete some large files from git history. 
The scenario is, those files were added accidentally in a feature branch and later I deleted them and commit again in the same branch. Now that branch has been merged to master and got deleted. We have multiple commits and PRs merged to master after that bad commit.

As those files are still there in git history, they are consuming space in bitbucket and I am getting warning for that. 

I was trying to find out a mechanism to delete those files from that commit#.

BFG tool is doing the needful but there are few concerns:

1. approx 50 folks are working on this repo
2. there are Jira tickets having commit# and PRs, and if we use BFG, that will rewrite history and create new commit #. In that case, we need to update those Jira tickets with correct commit# (Jira tickets count is unknown)
3. bad commit was done on 19th August 2021 and we have multiple PRs merged and branches created after that

Please suggest if there is a better way to do, addressing above points.

Hi @Swati Singh,

A new question was posted with similar concerns here:

I'm not sure if the question was created by one of your team members or not? You can check what I have responded there and let me know if you have any questions.

Kind regards,

Hi @Theodora Boudale

Yes that ticket was raised by my team member. Thanks for your response.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,223 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you