I have added a file named \"file1.txt\" to a Git repository. After that, I committed it, added a couple of directories called dir1 and dir2>
\"file1.txt\"
dir1
dir2>
go to your project dir and type:
git filter-branch --tree-filter 'rm -f ' HEAD
after that push --force for delete file from all commits.
git push origin --force --all