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. Why does .gitignore not work for a file that is already tracked?

    Git ignores only untracked files. If a file was committed earlier, it stays tracked despite the rule. Run git rm --cached file to stop tracking it, then commit; the file remains on disk.

    IntermediateQuick answer1 min read