How do i clean a bitbucket git branch after deleting it?

So I have had three branches, master, test1, test2. Someone did something silly, and now test1 includes 1.4 gbyte of binary files. Ok, we dont need branch test1 anymore, so i go ahead and delete it from the Bitbucket gui interface for deleting branches. Branch is gone, but the whole repository is still 1.4 gbyte large. How do I clean that? The branch is gone...

3 answers

This widget could not be displayed.

What can usually happen with git repo is when we just delete something, the actual files would be in the repo.

This would be a good read https://confluence.atlassian.com/bitbucket/maintaining-a-git-repository-321848291.html

 

This widget could not be displayed.

When you delete a branch, the commits on it are still present until they eventually get cleaned up (usually 30 days).  If you're lucky, this may fix itself in a little bit of time.

You could also potentially clone the repo down, fix it using plumbing commands, delete the remote copy, and push your local copy back up making a new clean copy.

 

Look at this: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery

http://git-memo.readthedocs.org/en/latest/garbage_collecting.html

This widget could not be displayed.

Thanks! I've tried the "Garbage collecting dead data" from the maintaining info, but woah, dudes. It's 2015. Why do I have to take care of stuff I deleted? The other options dont work for me, because my branch is already gone in all ways I know how to see it. Yet the garbage collection didn't work.

Second, ok in about a week it'll be 30 days since this first occurred. Let's see what happens. Otherwise I just create a new repository and forget all old one...

thanks for your hints!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

232 views 14 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you