3 ms·
If people have made this mistake, is there a way of getting it out of the public archive (short of shutting down the repository), or will it forever sit there,
by houshuang 14y ago
If people have made this mistake, is there a way of getting it out of the public archive (short of shutting down the repository), or will it forever sit there, part of the indelible history?
- adamtulinius 14y agoModify history and git push -f. Done.
- tmhedberg 14y agogit filter-branch --index-filter 'git rm --cached --ignore-unmatch rsa_private_key' -- --all Now you have a completely rewritten repository. Anyone who cloned or forked your repo will have the old history, divergent with your own, still containing the sensitive key. It's quite a mess to clean up, but that's about all you can do.