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?
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @asperry, yes, this is what I meant :)
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Theodora Boudale
Thanks, my issue has been resolved against ticket https://support.atlassian.com/requests/BBS-196730/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.