The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I can't push after garbage collecting dead data (2gb < size of repository < 5gb)

Greysnek
March 8, 2020

Hi

    With my last commit, I accidentally exceeded the 2GB limit

    after which I did the following:

  1. git reset --hard HEAD~
  2. tried "git push --force", but size of local repo didn't change, so it was pointless
  3. git reflog expire --expire=now --all
  4. git gc --prune=now

    On this stage size of local repo +- 200MB, but "git push --all --force" not works


fatal: TaskCanceledException encountered.
A task was canceled.
Password for '...':
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 444 bytes | 222.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Repository is over the size limit (2 GB) and will not accept further additions.
remote:
remote: Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw.
To <repo link>
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<repo link>'

 

    Just in case: I'm not the admin of repo

 

   Sorry if this problem already was, but I can't search it 

 

Thank you in advance!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2020

Hello @Greysnek,

Welcome to the Community.

You did it right, here's the guide on how to reduce repository size. The repository size in Bitbucket doesn't necessarily reflect such cleanups immediately because garbage collection isn't triggered on every update being quite an expensive operation.

I kicked off GC for your repository, its size reduced to around 300Mb.

Let me know if you have any questions.

Cheers,
Daniil

Greysnek
March 8, 2020

Big thank you

Like Daniil Penkin likes this
0 votes
Greysnek
March 8, 2020

-

TAGS
AUG Leaders

Atlassian Community Events