git remove sensitive data from history in files
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD
It’s a time intensive task might takes good amount of time to complete. As it has to check each commit and remove.
If you want to push it to remote repo just do git pushgit push -all