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. What is the difference between git diff and git diff --staged?

    git diff shows changes in your working files that are not yet staged. git diff --staged shows changes already added to the staging area, which is exactly what the next commit will contain.

    BeginnerQuick answer1 min read