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 cherry-pick a merge commit?

    Add -m 1 (or -m 2) to say which parent is the mainline, because a merge commit has two parents and Git cannot know which side's diff to copy.

    AdvancedQuick answer1 min read