What does git revert -n (--no-commit) do?
It applies the reverse of a commit to your working tree and index without committing. This lets you revert several commits and record them together as a single commit.
Explain it simply
Normal revert makes one commit per reverted commit. If a feature came in as five commits and you want it out, five revert commits are noise.
With -n, Git applies each reversal but stops before committing. Revert them all, review with git diff --staged, then make one commit with a meaningful message, such as 'Remove beta search feature'. If conflicts appear they arrive as usual. git revert --abort cancels a multi-step revert.
Example
git revert -n a1b2c3d
git revert -n d4e5f6a
git diff --staged
git commit -m "Remove beta search feature"What to say in the interview
"git revert -n applies the inverse changes without creating commits, so I can revert several commits and commit once with a clear message. I review with git diff --staged before committing."