Hello, in Bitbucket shows a size of 928.6 MB but my repo locally is showing 462252 KB when I run "git count-objects -v". Am I missing something here? Is Bitbucket Cloud counting something else? I haven't change anything locally and did a git pull.
We have tools that allow us to see information from the user's account. We can also get temporary access to the user's account for troubleshooting purposes when the user request help, so if needed, I'll be able to access it even if the repo itself is private.
We've run a git gc from our side and the size of the repo is now 305MB. Is there anything else we can help you with?
You're welcome, Francisco :) The size of the repo will not be a problem until you reach the hard limit (2GB) in which case you won't be able to push any new changes. Bitbucket runs automatic garbage collections so the difference in size should be addressed soon.
However, if you're concerned about this or would like to make sure things are ok, you can always let us know here in Community and we'll run the garbage collection for you.
In case your repo does actually reach the 2GB, you can follow the instructions at Reduce repository size to fix it.
Hope that helps!
I am facing the similar issue in my private repo https://bitbucket.org/kabuku/rinkak-mms-connect. The settings page says its size is 1.5 GB while `size-pack` of `git count-objects -v` is 450,238 KB. It's been more than a week since I noticed the gap between the sizes.
In my case, there had once been a big file in commit history, so I forked the repo to https://bitbucket.org/kenji_imamura/rinkak-mms-connect and rewrote history using BFG following the instructions to see if it helps reducing the size of the repo. Now, the settings page of the forked repo says its size is 1.6 GB while `size-pack` of `git count-objects -v` is 92,904 KB.
Will `git gc` also help my case?
Hi @pperez_24, I found 3 repos in your account that were reaching or exceeding the 2GB limit, and I've run a git gc on them. For one of them, the size was reduced from 2GB to 1.4GB, but for the other 2 repos the size didn't change, which means you'll have to reduce their size locally. The steps are explained in the article Reduce repository size.
Once you do that, wait a little bit for the automatic garbage collection to run on the remote. If it doesn't let us know so we can run it manually.
Hope that helps :)
I've checked your repository 'saramek' and I could see it's just 125.7 MB. Is that the size your local repository is showing? Does it differ? Usually we won't manually run git gc unless the repositories are too big, please let us know if you need any further assistance with this!
I've cleaned my git repo locally and tried to push it. It told me I needed to pull first since there were changes on the remote that I didn't had but since I committed last, that could not be. So I forced a push resulting in having different size in repos. It's not clear to me how to solve this. Could you help me? I'm talking about the colibry-services repo.
Hi @Dmitri Bogatenkov ,
I've checked your repos and found one that is 2GB in size, but after running the git gc the size didn't change. Can you run the following command on your side and show us the output?:
git count-objects -Hv
Let us know and we'll be happy to continue helping you.
End users don't have access to the remote repositories as they're hosted in Bitbucket, so you won't be able to run git gc there. Git gc runs automatically on the repos, although sometimes you can ask us to run them manually if you urgently need the size to be reduced to the same size you have on your local (after you've followed the steps at Reduce repository size).
Hope that explains!
Hello, in Bitbucket shows a size of 1.7 GB but my repo locally less when I run "git count-objects -v". Am I missing something here? Is Bitbucket Cloud counting something else? I haven't change anything locally and did a git pull.
link to repo — https://bitbucket.org/itcase/erta/
I am facing a similar issue in my private repo https://bitbucket.org/scotneygroup/toca-system/src/b_Dev_3_1/
The settings page says its size is 1.1 GB while `size-pack` of `git count-objects -v`is 463810 KB.
In my case, there had once been a big file in commit history, so I forked the repo to https://bitbucket.org/lalarukh/test-lala/src/b_Dev_3_1/ and rewrote history using BFG following the instructions to see if it helps to reduce the size of the repo.
Now, the settings page of the forked repo says its size is 1.3 GB while `size-pack` of `git count-objects -v` is 434997 KB.
I tried to run the git gc but it seems to not work in my case. Can you help me with this?
Hi @LalaRukh_Talha ,
You're seeing different sizes because you're measuring different things (remote repo vs local repo) and they don't always have to match.
Forking the repo will not help, as it will just copy everything from the old repo, including its history (which contains the big file you mentioned above). If you want this file to not be part of the repo, the easiest way would be to delete the image and start a new repository from scratch (initializing git again and uploading it to Bitbucket) so there's no trace from that file.
Running a git gc on the local won't work either, as what you want to reduce is the size of the remote. I've run a git gc on the remote for you and the size has decreased to 215.2 MB.
Hope that helps!
I've run the git gc on the remote but the size hasn't changed, it remains as 1.9 GB.
For the future, you could run git gc on your repository using the following command. Note that this will only apply to your local repository, this will not be executed on the remote repository that is hosted in our servers.
However, that will not magically decrease the size of your repository, you'll need to reduce the size of your repository as explained at Reduce repository size.
Let us know if you have any questions!
I have reduced our repo to 26meg using:
$> git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch curator/assets/' --prune-empty --tag-name-filter cat -- --all
$>git push origin --all --force
$>git push origin --tags --force
Worked great! But BitBucket still shows 1.6G.
Can you please `git gc` on email@example.com:pkl_wellborn/curator.git so it will show the updated size?
Hi @Ana Retamal or Atlassian Team,
I am also facing the same issue. My code folder is actually around 0.25 GB (size-pack 251487 KB's), but the repository is showing 1.85 GB.
Could you please help me to resolve this? as after 2GB my repo will become read only mode.
The size of your repository is not only the size of the size pack, it's the total size of the items displayed when you run
From the official Git documentation:
count: the number of loose objects
size: disk space consumed by loose objects, in KiB (unless -H is specified)
in-pack: the number of in-pack objects
size-pack: disk space consumed by the packs, in KiB (unless -H is specified)
prune-packable: the number of loose objects that are also present in the packs. These objects could be pruned using
garbage: the number of files in object database that are neither valid loose objects nor valid packs
size-garbage: disk space consumed by garbage files, in KiB (unless -H is specified)
As you can see, the rest of the items such as garbage and duplicate objects also counts as part of the repository size.
I've checked the size of the remote and it's 1GB at the moment. If you still don't think this corresponds to the size of the local repo, please show us the output of git count-objects and we'll continue helping you.
Hi @balramt_r ,
I've run git gc again but the size hasn't changed. Can you confirm that you pushed the new reduced repository to the remote? You need to take action on your side first so it will be reflected on the remote.
Let us know if you need anything else!
Hi @Ana Retamal ,
Our repository was stating a 1.5GB size via the admin page and we tried deleting two build branches in hopes of purging the commit history and then recreated them. By doing so the repository size jumped up to 1.7GB.
Locally, however, the size is at most 600MB.
Could you run git gc on bitbucket.org:nrfwebmaster/d8.nrf.com.git to see if there is any reduction in the size?
Thank you in advance.
I've checked your repository and I could see that its current size is 96.5 MB, so it seems like the automated git gc run on it already.
For the future, I'd recommend you submitting a new question, as replying to an already existing (an old) one will reduce the chances of one of us seen it.
Hello @Ana Retamal ,
I have the same problem, could you please take a look at our repository?
Current size shows 1.01 GB for some reason.
This is not an irregularity, it is normal that this happens and it's a result of some of the operations Git performs.
Currently, it's not possible for users to run git gc on remote repos, but you're welcome to contact us anytime you need it. There's also a Feature request that you might be interested, you can find it at Issue 11593 . You can vote for it to increase its popularity or write a comment if there's anything you'd like to add. Our development team will give a first-hand update through that ticket if there's any progress or review made.
Hope that answers your questions, Manjunath!
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
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