1

git filter-branch --index-filter 'git rm --cached -r --ignore-unmatch logs' --prune-empty --tag-name-filter cat -- --all

rm -rf .git/refs/original

git reflog expire --expire=now --all

git gc --prune=now

git gc --aggressive --prune=now

git push origin --force --all

These are the commends i used to reduce bitbucket repo size but the size was increasd

Roberto Tyley
  • 23,105
  • 11
  • 70
  • 100
Basha Vali
  • 19
  • 2
  • I imagine you ran those commands on your local repository? AFAIK, `git gc` does not propagate to remotes. – user Sep 17 '15 at 01:44

1 Answers1

1

As illustrated here:

  • git gc will be run regularly by BitBucket
  • you can force Bitbucket to perform a git gc

See also "Reduce repository size"

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755