I am new to git repository. I have a 2gb limit in bitbucket and bymistake I added one images folder of 1.5 gb and pushed the code.
Now the bitbucket size is 1.8gb. To remove the folder from history I followed these steps.
Remove folder and its contents from git/GitHub's history
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/ >> .gitignore git add .gitignore git commit -m 'Removing images from git history' git gc git push origin master --force I followed these steps and checked in my previous commits and the folder is removed. but git count-objects -v still gives the size-pack of 1.8gb
Also in the bitbucket repository settings its still showing 1.8gb
Am I missing something?