How to delete a read-only branch?

Jeff Goodsell March 2, 2018

I made a commit with an unexpected folder added, which made the repo over 5GB.

Pushed to bitbucket, now it's read only. The repo was really small before, around 30 files, I tried resetinng to a commit before, but somehow it's stuck at that size even after removing the files and doing the recommended gc, etc. 

So on my server I just deleted the .git folder and started over since it was just a few files and changes were not really important. But now the repo is read only on bit bucket.

So I can't git push --delete the branch which I want to do and then just push my local branch up 

Any ideas how to fix it? I even tried the delete link on the bitbucket website for the branch, but it wouldn't delete. That's all I really need to do at this point, delete that branch and get rid of whatever is clogging the pipes in this repo.

1 answer

1 vote
Steve Thornhill
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.
March 2, 2018

Is this a cloud Bitbucket? Just checking as that can set your repo to read-only if it exceeds the size.

If so, you can try a git reset ( see - https://git-scm.com/docs/git-reset )

and the retry the push ( possibly with the force option )

Jeff Goodsell March 5, 2018

Thanks! We finally managed to delete the repo and get it working again.

Steve Thornhill
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.
March 5, 2018

No problem, glad to help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events