Git interview preparation.
Turn your understanding into examples, reasoning, and clear trade-offs.
Explain before you reveal.
Choose a level, explore explained answers, then try a focused session.
3 questions
Merge vs rebase vs cherry-pick?
Merge, rebase and cherry-pick integrate changes through different history operations. Merge combines histories, rebase recreates commits on a new base, and cherry-pick recreates selected changes on the current branch. Recreated commits receive new IDs, which matters when other people already depend on the old history.
Reset vs revert, and when should I use stash?
Reset changes the current branch reference and may also change staged or working files depending on its mode. Revert records a new inverse change while preserving shared history. Stash stores local changes temporarily so another operation can proceed, but it should not replace committing important work.
How do I resolve a merge conflict or find a bad commit?
A merge conflict means Git cannot automatically decide how competing changes should combine. Resolving it requires understanding the intended behavior, not just removing conflict markers. Bisect solves a different problem: it narrows the commit range that introduced a reproducible regression through repeated good/bad checks.
Difficulty is editorial guidance. These questions are not a ranking of interview frequency.
All Git interview questions by concept
Use the filters above for a practice selection, or follow the full question directory below. Each answer includes its source and explanation; difficulty labels are editorial guidance.