I want to delete a folder from commits in my git repository, so I use this estimate:
git filter-branch --tree-filter 'rm -rf folder' HEAD
git push origin master --force
But there are no changes in my git repository, those commits that contain the folder I want to delete are on git repo.
So, I will try again, but it shows:
.git-rewrite already exists, delete it
I don't know what else I can do to remove it from all the commits that constantly contain the git repo folder.
source
share