Interview practice question
Undoing a bad commit that is already deployed
Cloud & DevOps · Git and Version Control · Beginner
A commit merged to main last hour broke production. How do you undo it safely?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- git revert <commit> creates inverse commit.
- Don't rewrite shared history.
- Merge commits: revert -m 1.
- Push via PR, deploy.
- Fix properly later.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.