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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

2GB> Repository not letting me push

Edited

Hello! We are a team of students and we are working on a game project. 
We just now realized we can't push our changes anymore due to our repository going over 2GB size. So, therefore, I went in and deleted a bunch of unneeded files and also added more folders to the .gitignore. I removed more than 1GB of files, but it still doesn't let me push and says I have a 2GB repository. 

I tried using the command line and typed:

git reset --hard HEAD~1
git push --force

But it still doesn't let me. Can someone please help? Thanks

20 answers

1 accepted

2 votes
Answer accepted
Ana Retamal Atlassian Team Apr 19, 2018

Hi Arvid! I've run a git gc on your remote repository and the size has decreased to 705.6 MB. 

To avoid hitting this limit quickly again, and since you're working on a game project that I assume might contain media files or big files in general, I'd like to recommend enabling Git LFS. Free accounts include 1GB of LFS storage per month.

For more info you can read Git LFS storage in Bitbucket and Use Git LFS with Bitbucket.

Hope that helps!

Ana

Thank you so much! Now we can get back to working tomorrow.

We will definitely be looking into Git LFS, and be more mindful of our repo size from now on.

Thanks again!

Like oswald likes this

@Ana Retamal  I have the same Issue I am unable to push my changes 
because it exceeeded 2GB can you please help me on it 
Thanks

Ana Retamal Atlassian Team Aug 21, 2020

Hi @nextgeni_mubashir_ali, welcome!

I've checked your Bitbucket account, but I could not find any repositories in it. Were you referring to a different Bitbucket account? Please let us know the username and repo name so we can have a look.

Cheers,

Ana 

Hi @Ana Retamal can you check my repo please? https://deskcodesolution@bitbucket.org/deskcodesolution/trippy-moviles-upgraded.git

Removed large commits but still its not allowing me to push.

Ana Retamal Atlassian Team Oct 20, 2020

Hi  @deskcodesolution :) 

I've run a git gc on the remote and the size has decreased from 1.7 GB to 455.7 MB. You should be able to push your new files now.

Have a good day!

Ana

Like oswald likes this

Hi @Ana Retamal

Could you help me run git gc in: https://Loc_rabbirt@bitbucket.org/locwp/goodlayers-themes-version-3.git?

Thank you so much for your help. I'm just not sure why we don't have a permission to do by ourselves, it's quite annoyed when rely in Atlassian Team everytime like that.

I hope hear your reply soon, have a nice day!

Loc

Ana Retamal Atlassian Team Nov 10, 2020

Hi @Loc_rabbirt,

Your repo was only at 1.1 GB (still far from the 2 GB limitation) and after I ran the gc, the size didn't change. Can you check the size of your local to make sure the repo is indeed smaller? Please use the following command: 

git count-objects -Hv

Best regards :) 

Ana

Like Loc_rabbirt likes this

Hi @Ana Retamal ,

I checked with your cmd and the size indeed 1.1GB. May I know how I can reduce the objects size? I take some screenshots below.

I saw the .git size is 1.1GB but the real size of those folders are far from them.

support - 2020-11-10 - 19-15-05.png

And the 1.1GB come from pack-xxxx below, 

support - 2020-11-10 - 20-04-53.png

May I know how I can reduce it? I tried following here: https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/ but nothing work.

Thank you so much for your time,

Loc

Ana Retamal Atlassian Team Nov 10, 2020

Hi Loc,

The total size of a repository is not just the sum of its files, it’s also the references, history, etc. If you ever committed a big file (for example, an image), and then removed it, even though this file is not part of your current repository anymore, it was part of it once, so it remains in the history.

If that happened and you don't care about the history of the repo, the easiest way to fix it would be to start a new repository from scratch and add only the current content, so there won't be any big files in the history.

If you want to keep the history, there are some operations that you could perform to completely remove a file from there, but it's quite complex and I wouldn't recommend it unless you're very familiar with git operations. 

Hope this  explains.

Cheers,

Ana

Like Loc_rabbirt likes this

Hi @Arvid Edström ,

Thank you so much for your information.

Best regards,

Loc

Hello @Ana Retamal 
I am having the same issue, making a game, pushed more than i should.

I went back a few pushs, but its still locked.
I would like to be able to push again to free some space and then merge my local branch with the current changes. For example including lightmapping in gitignore and deleting some outdated assets.


Thanks in advance

https://Jorge_Mayoraz@bitbucket.org/Jorge_Mayoraz/dungeon-crawler-tb.git

Ana Retamal Atlassian Team Nov 11, 2020

Hi Jorge!

I've run a git gc but the size has not decreased much, it's 1.6 GB now. Anyways, you should now be able to push again :) 

Hope that helps,

Ana

Like Loc_rabbirt likes this

 

Hi @Ana Retamal ,

I've tried to delete the dangling commits and enable Delete dangling commits when over size limit in Labs settings, but seem it only work when the repository size beyond the limit, is it right?

So there aren't anyway I can run git gc in my side and affect the remote repository, is it right?

TIA!

Loc

My repo: git@bitbucket.org:locwp/goodlayers-error.git

Hi @Ana Retamal I just had a similar issue i enabled Delete dangling commits from Labs but it had no effect. my repo is git@bitbucket.org:flumemarketing/yamaha-e-commerce-api.git. Your help will be very much appreciated.

Ana Retamal Atlassian Team Dec 02, 2020

Hi @masato_saito

I've tried to run the git gc on your repository but it seems like the size can't be reduced anymore. It's currently showing 1.7GB in size, does this differ from the current size of your repo? Please run the following command and share the output with us:

git count-objects -Hv

Cheers :) 

Ana

Hi @Ana Retamal 

Thank you to git gc.
The result of my local git count-objects -Hv:

git count-objects -Hv
count: 5082
size: 97.71 MiB
in-pack: 23644
packs: 16
size-pack: 231.82 MiB
prune-packable: 319
garbage: 0

 

Hi @Ana Retamal 

Can I have git gc run into my repo too?

My repository name :

https://bitbucket.org/exonetik/altium-librairies

Ana Retamal Atlassian Team Dec 08, 2020

Hi @vincent-veilleux

After running the git gc the size of your repository has decreased to 147.4 MB. 

if you need anything else in the future let us know :)

Kind regards, 

Ana

Hi @Ana Retamal 

The local capacity is small, why?

I have also pushed to bitbucket several times.
Despite that, it hasn't changed from 1.72 GB for a while, is the number correct?

Ana Retamal Atlassian Team Dec 08, 2020

Hi @masato_saito, thanks for your update!

I've tried to run the git gc again but we're getting an error on our side. To fix that, I've submitted a Support ticket on your behalf, one of my colleagues will need to run the steps manually. You will receive a notification in your inbox regarding this ticket, please follow up with it so my colleagues can continue helping you.

If you need any further assistance, let us know! We're happy to help :) 

Kind regards,

Ana 

Like masato_saito likes this

Hi, @Ana Retamal ,

Can I have git gc run into my repo too ?
Thank you.

My repo : https://bitbucket.org/viavoo/orga

We are migrating to LFS soon

William

Ana Retamal Atlassian Team Dec 09, 2020

Hello William, 

I've run the git gc successfully and the size has decreased to 998.8 MB.

Regards :) 

Ana

Like William Bobo likes this

Hello, @Ana Retamal

I'm not sure if this is the best place to ask for this, but as I've seen that you have solved this issue for so many people, I decided to give it a try. I'm sorry if this is not the place to request assistance for my particular case.

I'm having the same problem: the repository size exceeds the limit. I've already made a force-push of a previous commit, after having enabled the "Delete dangling commits when over size limit" feature. However, that didn't make the remote reduce its size (I think that's due to the fact that I'm not the owner of the repository, so enabling that on my account doesn't affect the behavior when pushing to that repo).

This is the repository: https://bitbucket.org/mobillers/legendary-leaders

We're going to be migrating to LFS right after this is solved, as we're developing a game.

Thank you so much for your assistance.

Regards,

Ignacio Mosconi

Ana Retamal Atlassian Team Dec 10, 2020

Hi @Ignacio Mosconi, welcome to the Community! 

First of all, no worries, you came to the right place :) But even if you didn't, there's no harm in asking, someone would be able to point you in the right direction! 

Second, I've had a look at the repository, run a git gc and the size has now decreased to 1.7 GB. The repo is still quite big, so if you're planning to move to LFS I'd recommend you do it asap, as you're risking surpassing the limit again soon.

I hope that helps, and if you need anything else or have any other questions, you know where to find us :)

Kind regartds,

Ana

Thank you very much, @Ana Retamal

I'm migrating to LFS right now. Once more, I'd like to thank you for your quick support.

I wish you a nice day!

Best Regards,

Ignacio Mosconi

Like Ana Retamal likes this

Hi, @Ana Retamal

I'm sorry to bother you with this again. I've been working on the migration to LFS, but I've encountered a problem. In order to do the former, I've been following the documentation found at https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/. I was able to complete each step successfully up until the part where the converted repository has to be force-pushed. I ended up exceeding the maximum repository size again (even though I changed many file types to be LFS references now). I believe the issue was that I only pushed the changes for the "master" branch, and not for the "development" branch, so the repository ended up having both the version with and without LFS references for the affected files. I have now tried deleting the old "development" branch, but the repo size has remained the same, so I imagine that the "git gc" command has to be run again.

Perhaps it's worth mentioning that we've been using the re-base workflow for this repository, so both the "master" and "development" branches have the same commits.

I'd really appreciate if you could tell if my theory is correct, or let me know if I've done something wrong when trying to do this.

Once again, thank you so much for your help.

Best regards,

Ignacio Mosconi

Hello @Ana Retamal,

I can see you are saving many people's lives here. I get stuck with the same issue from yesterday and my manager waits for me to see when I can solve this. My repo also exceeding 2 Gb size.

Can you please help me with this urgent problem?

Since this, a business repository is there any way to send the repository in private?

or it's safe to paste it in here?

Hi @Ana Retamal  I have the same Issue I am unable to push my changes 
because it exceded 2GB can you please help me on it 
This is the repositoryhttps://bitbucket.org/backendpag/pag-ios/src  
Thanks

Hi Ana,

 

Can you do this for us? One of our repository has crossed 2 GB limit

Hi Ana,

today I couldn't push code to my repository any more. Can you please run a gc on it: [https://bitbucket.org/docmorris/keycloak.git]

Regards

We are facing same issue. We are not able to push the cleanup that we did to reduce the repo size because the current repo size is more then 2 GB. Please help

Hi
We are facing a similar issue while pushing code as size exceeded 2GB. First of all, we don't understand how did that happen as our files are in MB and secondly I did git gc in my local repo and it worked but I don't know how to the perform the same in remote repo.

Could you please help?

We are having issue with our main repo as well. When running : git count-objects -Hv

 

size pack is : size-pack: 737.46 MiB 

 

But our repo is currently showing as 2.1GB in bitbucket . @Ana Retamal  @Alexander Gultsov  you think you could help running a git gc for us?


My repo only has a initial commit (~200kb) but I am getting limit exceed errors.. I only have a master branch as I just started my project. can you please help?

https://bitbucket.org/AI-BOM/bom/src/master/

Hello, I'm having the same problem. We execute the commands:

git reset --hard HEAD~1
git push --force


We have tried deleting 2 commits. Please is quite urgent.

Thank you

I don't know about the command you executed but I can tell you thatabove 2GB repository is going to do problems with your project. You cant go beyond 2GB. It will overwrite last commit I think. Only thing to do is to move your large files to your server, dropbox or similar. 

Hi. We know perfectly well that the maximum is 2GB, the problem is that git keeps a history of everything and as much as we delete the files and push, the files really continue to exist.
Possibly executing a 'git gc' we will be able to reduce the size.
Please, @Ana Retamal , can you do this?

Thanks

My repository run out of 2GB.

I follow "Undoing the last push" now I need your help at step "Remove dangling commit" (Now you'll need to raise a support request to prune the last commit and run garbage collection so that the last commit is completely removed and the repository’s size is reduced.)

Please help!

Hello,

We have a repository of 1.1GB size and now we can't commit new things because it will be over 2GB. We know that there is limit size of 2GB or we need to delete some things from this project.

 

1) Our question is how to get more Storage?
2) What are our options?
3) Use your Bitbucket server options, we have less than 10 employees? Prices are 10$?
4) Is it possible to choose another package, let say Premium? and Get 10GB for one our projects?

Basically we need more than 2GB and what options do we have?

Hi @Ana Retamal , 
Could you please give a piece of advice on how to reduce the repository onto bitbucket. Actually, I did actions like:
1)git filter-branch --index-filter 'git rm --cached --ignore-unmatch *.zip' -- --all
2)rm -Rf .git/refs/original
3)rm -Rf .git/logs/
4)git gc --aggressive --prune=now
5)git push origin --force

Issue was with '.git' directory.
And the local repository  reduced  from 1GB+ to 10M. But the remote repository still large . 
https://bitbucket.org/pa-server/ctt_test/src/master/

Size still 1.16 GB

Thanks,
Alex

I'm having the same problem, did you manage to solve this?

I guess @Ana Retamal  didn't see the messages above. Am I right?

Thanks,
Alex

Hello,

I am facing the same issue like the people above, my repository size has exceeded the 2GB size limit is it possible to run a git gc on my remote repo? Or revert it back to the latest commit before it actually exceeded the 2GB size limit?

Thank you

Ana Retamal Atlassian Team Jan 10, 2020

Hi @Loud Orange 

I've run a git gc on your repo but the size only decreased to 2.1 GB. You can check the size of your local repo by running the following command:

git count-objects -Hv

After that, you can follow the steps in the article Reduce repository size to bring the size under 2GB.

Note that we can not perform any actions in your repository so we won't be able to perform those steps for you.

If you need anything else, let us know and we'll be happy to help :) 

Cheers,

Ana

Like Loud Orange likes this

Hello Ana,

 

Thank you I will have a further look at this if I need further assistance I will send a message.

 

Thanks again.

Hello Ana,

I reverted 2 commits back by doing git reset --hard <<commitID>>

and then git push origin master --force so now the problematic commits that caused my repo to exceed the size limit have disappeared from the commits list. But the repo size is still shown to be 2.13GB.

 

Is it the case that you have to run again a git gc again so the changes on the repository size can be reflected to me?

 

Thank you

sorry for my bad English

Hi,

 

I have the same issue with over 2GB. I can't commit any changes to bitbucket now.

Please help me run git gc on my server

 

Here is my bitbucket repo: https://bitbucket.org/hoanvusolutions/chubb-mobile/

 

Thanks 

Ana Retamal Atlassian Team Jan 03, 2020

Hi @hoanvusolutions ,

I've run a git gc on the remote repository and the size decreased to 1.7 GB. 

Let us know if you need anything else!

Have a nice weekend,

Ana

Hi Ana,

Thank you for your help.

I have the same problem again. I can't commit codes anymore. Can you please help reduce the  size so that I can login to delete unessary source

Here is my bitbucket repo: https://bitbucket.org/hoanvusolutions/chubb-mobile/

 

Thanks 

Lee

Hi,

 

I have the same issue. I deleted many respositories there but stil have the same error. I tried to run 

git reset --hard HEAD~1
git push --force


Can you please help me run git gc on my server

Thanks and Regards
Hai

Hello,

I am having the same issue. Please help by running a remote gc on my repository. Local repository size is only ~ 120 MiB. 

Thanks

Gil

Hi this is my repo name.

 

git clone https://atique1122@bitbucket.org/ri_drillbox_pd/drone_mainsite.git

 

Currently I am having 1.5 gb. I want to reduce my repo size. In local its showing 350mb. In server 1.5 gb. I don't understand. Can you please help me out.

Hey

i'v got the same problem here. I've done the steps in the Reduce repository size.

Can someone please help me ?

 

The name of my repo : https://Striwx@bitbucket.org/nicepenguins/projet-kotick.git

 

Yvan

From Nice Penguins

Looks like i manage to solved my problem thx!

Ana Retamal Atlassian Team Nov 01, 2018

Hi @Striwx, glad you could fix it!

Sorry for the late response, though. Let us know if you need any further assistance.

Have a nice evening :) 

Ana

Thank you :)

Forgive my poor English.

am facing the same issue.  

I tried using the command line and typed:

git reset --hard HEAD~1
git push --force

But it still doesn't let me. Can someone please help? Thanks


My repository name :

https://zhudengquan@bitbucket.org/zhudengquan/nyatomanzhan.git

Ana Retamal Atlassian Team Oct 01, 2018

Hi! You don't have to worry about your English :) 

I've tried running a remote git gc in your repo, but the size didn't change. Are you sure you reduced the size locally? As I told Redowan, please make sure you're following all the steps in the article Reduce repository size. Keep in mind that the 1 in git reset --hard HEAD~1 is the number of commits you need to go back to make your repo under 2 GB again.

Once you do, let us know again and we'll have a look.

Regards!

Ana

Hi. I'm new to bitbucket (git altogether) and stuck with a repo with over 2gb limit. I also tried this

git reset --hard HEAD~1
git push --force

Still, it says the repo is in read-only mode. Please have a look. 

Ana Retamal Atlassian Team Oct 01, 2018

Hi Redowan, according to your message looks like you only followed steps 4 and 5 from the article Reduce repository size. Please note that only that will not fix the situation. Also, the 1 in git reset --hard HEAD~1 is the number of commits you need to go back to make your repo under 2 GB again.

I've run a remote git gc and the size has come down to 2.5GB, unfortunately that's still over our 2GB limit. Please repeat the steps in the article above so the size can be reduced even more. If you need any additional help, let us know!

Cheers,

Ana

Hi. Am facing the same issue.  
Can anybody check my repository named imagerepo , from bitbucket team.  

Ana Retamal Atlassian Team Jul 27, 2018

Hi @Sujith Royal, I've checked your Bitbucket Cloud account associated to your email address and I couldn't find any repo that you have access to with that name. Do you use a different account to access it?

Let us know!

Ana

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,715 views 10 16
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