git目录中可能因为失误或者其他原因上传了敏感文件,需要从多个分支中删除敏感文件及其历史记录
git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch [敏感文件]' \ --prune-empty --tag-name-filter cat -- --all
echo "[敏感文件的根目录路径]" >> .gitignore
git push origin --force --all