Interview Q&A / Git & GitHub

INTERVIEW Q&A · 97 QUESTIONS

Git & GitHub interview questions

Branching, merge vs rebase, resolving conflicts and pull requests, the way teams actually work.

  1. How do you find out which rule is ignoring a file?

    Run git check-ignore -v path. It prints the file, line number and pattern of the rule that matches, which helps when a file unexpectedly does not show up in git status.

    IntermediateQuick answer1 min read
  2. What is git bisect, and when would you use it?

    git bisect does a binary search through commit history to find the exact commit that introduced a bug. You mark one good and one bad commit, and Git checks out midpoints until it finds the first bad one.

    IntermediateQuick answer1 min read