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

Why does repo size under Repository Details not match the size of .git directory?

asperry March 11, 2022

I just recently used git-filter-repo to remove large files from my repositories history. I went from over 300 MB to about 1 MB. I force pushed the repository and now when I clone it, I get the smaller (filtered) repository, but on the Bitbucket website under "Repository Details" the size still says over 300 MB. I pushed the filtered repository several days ago. Why does the website still say the size is so large when the size of the cloned repository is clearly much smaller?

2 answers

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

Hi, @asperry, welcome to the community! 

As you confirmed you removed some large files from your repository history and force pushed these changes to your remote repo, I believe the remote still have some dangling commits that need to be removed with a GC. In this case, I can run a GC on the remote repo to remove any dangling commits there, In order to do that, I just need to know the repo name. Could you please share the workspace_ID/repository name masked with asterisks here so I can identify it? 

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

Kind regards,
Caroline

asperry March 15, 2022

That would be great! We're not up against any size limits as far as Bitbucket is concerned so there's no rush if Bitbucket periodically runs GC on some infrequent interval. My question was more based in curiosity and a desire for numbers to agree.

I'm not sure what you mean by sharing the repository name masked with asterisks. Do you mean give a portion of the name but use asterisks for the rest?

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2022

Hi, @asperry, yes, this is what I meant :) 

Kind regards, 
Caroline 

asperry March 15, 2022

I have two repositories that would need GC. They are:

 

utahtelerobotics/rob************** and utahtelerobotics/cap**************

 

In the future, do I need to request GC, or is it something that's done automatically at some interval?

 

Thanks!

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

Hi, @asperry

Thanks for sharing their names. I have run a GC on both repos and removed the existing dangling commits. Could you please confirm if this is the expected size? 

Kind regards, 
Caroline 

asperry March 16, 2022

Both repositories look good to me now! Thank you so much!

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

Awesome, @asperry, thanks for your confirmation! 

Just to let you know, 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

Kind regards,
Caroline

Jacques Muller
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!
January 6, 2023

@Caroline R 
I need gc run on a repo, how do I go about requesting that.
I did filter-branch locally and my repo is now as expected. When I clone it it is also as expected but Bitbucket still reflects the initial size.

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

Hi @Jacques Muller,

Please create a new question in community via https://community.atlassian.com/t5/forums/postpage/board-id/bitbucket-questions, and provide the workspace id and repo name masked (with some asterisks and only revealing a few of the letters, so we can identify which repo it is), and we will look into it.

If the repo belongs to a workspace on a paid billing plan you can create a ticket with the support team instead via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Kind regards,
Theodora

Jacques Muller
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!
January 11, 2023

Hi @Theodora Boudale 

Thanks, my issue has been resolved against ticket https://support.atlassian.com/requests/BBS-196730/

Like Theodora Boudale likes this
0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2022

Hi @asperry ,

welcome to the Atlassian community!

Probably because your large files are in the history of your repo so, even if, they are not in the actual repo , they are in the previous commits yet.

In order to remove large files you need to rewrite repo history, otherwise git just keeps the large file in the history.

Take a look to the following article https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/

Hope this helps,

Fabio

asperry March 14, 2022

Thank you for your reply, but this does not answer my question. As I mentioned in the original question, I have already changed my repository history using git-filter-repo which is recommended over BFG or filter-branch. The repository that I clone does not contain the large files in the history. My question is why the size given on the Bitbucket website does not reflect that I have reduced the size of the repository by changing the history.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events