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
Written by Emanuele
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#