How to remove specific branch when repository exceeds a limit?

Ravi Patel September 16, 2018

Hi,

I exceeded the repository size limit to 2 GB. I want to remove only one branch and it will be reducing the repository size again.

I followed the instruction of removing just one branch from help page. But I am not sure how i can push that OR how i can remove the branch directly from Bitbucket? Because, whenever i push it gives exceed limit error.

I tried multiple times removing from Bitbucket, it didn't work. Maybe, because of exceeding limit.

I did gc(thrice) for removing branch. It didn't work. Please help to do gc asap.

If anybody can help with this, I really appreciate your time.

Thank You
Jay

3 answers

1 accepted

0 votes
Answer accepted
Ravi Patel September 18, 2018

This issue is resolved.
If you exceed 2GB of limit in free, Bitbucket automatically converts your repo to READ-ONLY. So, any kind of push is not allowed(even force push).

I filed a ticket for customer help and they reached out to me as temporary write access. I roll-back to previous version and I did clean  my local repo with help of following link: https://github.com/18F/C2/issues/439

After that i force pushed to bitbucket and customer service engineer ran gc on repo.

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2018

Hello,

Try to delete this branch from the Web UI:

Untitled 2.png

Ravi Patel September 17, 2018

I tried to delete from web UI too, It didn't work. It shows, failed. 
Thank You @Alexey Kryzhanovskiy

0 votes
Rambabu Patina _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2018

 @Ravi Patel, Can you try delete the specific branch remotely through git client using the command like below:

git push origin :<branchname> (or) git push origin --delete <branchname>

It will delete the given branch remotely. 

Ravi Patel September 17, 2018

@Rambabu Patina _Appfire_ : I tried this, Any kind of push is not working. It shows error "Repository is in read only mode (over 2 GB size limit). Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw".

From this help page i ran gc, and they have mentioned it should clean in an hour. It's about to 20+ hours, now.

Thank you

Rambabu Patina _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2018

@Ravi Patel As your repository seems extraordinarily large, you should reset the head of your branch for the repository then attempt a force push.

Checkout to your branch

git reset --hard HEAD~1

git push --force

Then try delete your branch and let me now if it works for.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events