You committed a password and pushed. Is `git rm` plus a new commit enough?
AdvancedConceptGitHub features, history rewriting and scale
Answer
No. The secret remains in history and in every clone and fork. First rotate or revoke the credential, since that is the only real fix. Then optionally remove it from history with git filter-repo, force-push, and ask GitHub support to purge cached views and PR refs.
git filter-repo --replace-text <(echo 'AKIA...==>REMOVED')
git push --force --all && git push --force --tags
More on GitHub features, history rewriting and scale
What does a GitHub Actions workflow look like at a basic level?BeginnerWhat are GitHub environments and what protection do they offer?IntermediateWhat is a GitHub Release and how does it relate to a Git tag?BeginnerWhat are the permissions of `GITHUB_TOKEN` and how do you restrict them?IntermediateWhy do fork PRs get no secrets, and what is `pull_request_target`?AdvancedWhat is the difference between a GitHub fork and a clone?Beginner