git, как исправить случайную коммиту пароля

git log --oneline -S <COMMIT_SEARCH_PATTERN>

# Copy the commit hash

git rebase - i <COMMIT_HASH>~1

# Change the marker to **drop**
# Exit from the editor

git rebase --continue
git push --force

# Of course - you have to change the password anyways.
DevPedrada