All subjects

Framework & DevOps · Interview subject

Git Interview Questions

Branching strategy, rebase vs merge, conflict resolution and PR hygiene.

51 questions

Quick interview answer

Merge preserves history with a merge commit; rebase replays your commits on top of the target for a linear history. Rebase local branches, merge shared ones.

Detailed explanation

For automation repos with many contributors, feature branches rebased onto main keep the history readable and make bisecting a flaky-test regression far easier. Never rebase a branch others have pulled.

Real-world example

Bisecting to find which commit introduced a flaky wait is trivial on linear history.

Interview tip

The golden rule line: 'never rebase public/shared branches'.

Next subjectAPI Testing