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 →
- How do you view Git history in a compact, readable way?
Use git log --oneline for one line per commit, adding --graph --decorate --all to see branches and merges drawn as a tree. Options like -n, --author and --since filter the output.
BeginnerQuick answer1 min read - What is git rebase -i, and what can you do with it?
Interactive rebase opens a list of your recent commits so you can reorder, reword, squash, edit, or drop them before they are replayed. It is the standard way to tidy a messy branch before opening a pull request.
IntermediateQuick answer1 min read