Interview Prep

Git interview questions and how to answer them

Git interviews usually come up as part of a broader technical screen, not a dedicated interview. The questions test whether you understand what's happening under the hood, not just which commands to type.

PrepVault surfaces the questions most relevant to your role and tracks your prep. Free to start.

Git interview questions and how to answer them

  • What is git bisect used for?

    Binary search through commits. Needs known good and bad commits. Can run automated tests. Finds first bad commit

  • Tell me about how you would handle disagreement over squash merges versus preserving merge commits?

    goals over preference. concise history. preserved topology. documented exceptions

  • What is GitHub Flow, and when is it a good fit?

    protected main. short-lived branches. pull requests. frequent deployment

  • What practical problem does branching solve for development teams?

    Branches isolate work safely. Multiple developers can work simultaneously. Main branch stays stable. Features can be reviewed independently. Experimentation becomes safer

  • What are the trade-offs between squash merging and merge commits?

    linear concise history. preserved topology. review fix noise. audit context

  • What does git clone do?

    creates full local copy including history. sets up origin remote automatically. checks out default branch. optional target directory argument

  • What is the difference between rebase and merge in Git?

    Merge preserves branch topology. Rebase rewrites commits. Rebase creates linear history. Shared branches need caution

  • How can git reflog help recover lost commits?

    Records local ref movements. Recovers after reset rebase amend. Create rescue branch from old hash. Reflog is local and expires

  • How do co-authored commits work in Git?

    footer trailer. multiple contributors. platform attribution. pair programming

  • How do you resolve conflicts during a rebase?

    Rebase replays commits one by one. Resolve and stage conflicts. Continue or abort. Be careful with ours and theirs

Common mistakes

  • Memorized commands with no mental model
  • Fuzzy on merge versus rebase
  • Not knowing how to recover from a mistake

What interviewers weigh

  • Understanding what commands do under the hood
  • How you handle conflicts
  • How you work in a team branching model

More that helps

Start free with PrepVault