Interview Q&A / Git & GitHub
Git & GitHub interview questions
Branching, merge vs rebase, resolving conflicts and pull requests, the way teams actually work.
Prefer rapid revision? Practise Git & GitHub short interview answers →
- What makes a good Git commit message?
A short imperative summary line of about 50 characters, a blank line, then an optional body explaining why the change was made. Describe the reason, not just what the diff already shows.
BeginnerQuick answer1 min read - Why are commit messages written in the imperative mood?
Git's own messages, like 'Merge branch' or 'Revert commit', are imperative, and the convention completes the sentence 'If applied, this commit will...'. It keeps the log consistent and short.
BeginnerQuick answer1 min read