Interview practice question
Accidentally committed a password
Cloud & DevOps · Git and Version Control · Beginner
You realise you committed a file containing a database password and pushed it to a shared repository. What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Rotate the secret immediately.
- Remove file, add to .gitignore.
- History rewrite (filter-repo) if needed.
- Inform security team.
- Enable secret scanning/pre-commit hooks.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.