Last Updated: February 25, 2016
·
2.821K
· emadb

Git: completely remove a folder from history

If you push something to a remote repo or just want to delete in your local repo, you can use this command to completely remove the files form all history:

git filter-branch --tree-filter 'rm -rf folder_to_delete' HEAD

Use at your own risk