title: Remove Folder from bitbucket history
body: <p>I am new to git repository. I have a 2gb limit in bitbucket and bymistake I added one <code>images</code> folder of 1.5 gb and pushed the code.</p>
  
  <p>Now the bitbucket size is 1.8gb. To remove the folder from history I followed these steps.</p>
  
  <p><a href="https://stackoverflow.com/questions/10067848/remove-folder-and-its-contents-from-git-githubs-history">Remove folder and its contents from git/GitHub&#39;s history</a></p>
  
  <pre><code>git filter-branch --tree-filter 'rm -rf import/images' --prune-empty HEAD
  git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git 
  update-ref -d
  echo import/images/ &gt;&gt; .gitignore
  git add .gitignore
  git commit -m 'Removing images from git history'
  git gc
  git push origin master --force
  </code></pre>
  
  <p>I followed these steps and checked in my previous commits and the folder is removed.  but <code>git count-objects -v</code> still gives the size-pack of 1.8gb</p>
  
  <p>Also in the bitbucket repository settings its still showing 1.8gb</p>
  
  <p>Am I missing something?</p>