Removing sensitive data from a repository
https://help.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch *.tgz' --prune-empty --tag-name-filter cat -- --all
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
git push --force --verbose --dry-run
git push --force
本文介绍如何使用git命令从版本库中彻底移除敏感数据,包括使用filter-branch、for-each-ref、reflog expire等命令进行数据清理和历史记录修改。

243

被折叠的 条评论
为什么被折叠?



