DevOps Interview DropBeginner TierScenario+10 XP on read

You accidentally committed a .env file containing API keys. What do you do?

Core Summary

Rotate the credentials first. That's the only step that actually makes you safe, since the secret is already in every clone, fork and CI cache that pulled before you noticed. Cleaning up Git history is a second, separate job that comes after.

Hints

Hint 1: Deleting the file in a new commit does not remove it from history

Hint 2: Assume the secret is stolen the moment it is pushed

Hint 3: There are two separate jobs: the credential, and the repository

Reported in interviews at Atlassian, GitLab