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 does 'Your branch is ahead of origin/main by 2 commits' mean?

    You have two local commits that are not on the remote yet. Nothing is wrong. Run git push to publish them. If it says behind, the remote has commits you do not have yet.

    BeginnerQuick answer1 min read
  2. What does git status tell you, and how do you read its output?

    git status reports your current branch, how it compares with its upstream, and three groups of files: staged changes ready to commit, modified but unstaged changes, and untracked files Git does not know yet.

    BeginnerQuick answer1 min read