All jobs / DevOps / SRE / cloud / Git

DevOps / SRE / cloud interview question · 1–3 years

A commit on main broke the build; three teammates have already pulled it.

How do you undo it?

The strongest answer

`git revert` the commit — a new commit that inverts it — push, and fix forward afterwards; history stays intact for everyone who already pulled

Why it works

Right — revert is the safe undo on shared history: it is additive, instant and reviewable.

What a good answer covers

Answers that fall short

Who gets asked this

More Git questions