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 is a pull request, and how does the code review workflow work?
A pull request (PR) is a request to merge your branch into another branch, usually main. You push a branch, open a PR with a clear description, automated checks run, teammates review and comment, you push fixes, and once approved the PR is merged and the branch deleted.
BeginnerIn-depth3 min read - Can you resolve a merge conflict on GitHub without using the command line?
Yes for simple text conflicts. The pull request page has a Resolve conflicts button that opens an editor with markers; fix them, mark resolved and commit. Complex cases like deleted or binary files need a local merge.
BeginnerQuick answer1 min read - How do you link a pull request to an issue so that it closes automatically?
Write a closing keyword such as Closes
BeginnerQuick answer1 min read - What are the three ways to merge a pull request on GitHub?
Create a merge commit keeps all commits plus a merge commit. Squash and merge combines them into one commit. Rebase and merge replays the commits onto main without a merge commit, giving linear history.
BeginnerQuick answer1 min read - What is a draft pull request, and when would you use one?
A draft PR signals that work is in progress and cannot be merged yet. It lets you share code early, run CI, and get feedback, then you click Ready for review when it is done.
BeginnerQuick answer1 min read