4

My BitBucket repo had a whole bunch of large files in that weren't needed. I removed them and then wanted to clear them out from the history to shrink down the repo which had gotten too big.

I ran BFG repo cleaner which reported 1755 files found and processed - all the ones I was expecting.

Ran the final git gc as instructed here: https://rtyley.github.io/bfg-repo-cleaner/

All fine - the .git folder shrunk to 17% its original size. Pushed it back up and the repo size as reported by BitBucket actually got larger!

Not sure what went wrong as all seemed to behave correctly up to that point.

Any advice gratefully received as I really don't want to have to recreate the repo to bring down the size.

Thanks

LizW
  • 41
  • 1
  • 2
    BitBucket runs `git gc` on its own (you can't trigger than manually), it make take a bit before it is cleaned up there, so maybe wait a bit? – Peter Uhnak Apr 08 '15 at 10:42
  • Thanks, do you know roughly how often it runs by any chance? – LizW Apr 08 '15 at 15:57

1 Answers1

4

As suggested by @peter, you need git gc to run on the hosted repository before you will see size changes. If in the interim you clone this repository and it has been cleaned-correctly, your clone should reflect the eventual size.

For self-hosted Stash you can probably trigger a gc, for hosted bitbucket.org the schedule is not published nor can it be influenced.

javabrett
  • 7,020
  • 4
  • 51
  • 73