Interview Questions: The Basics
What interviewers ask.
Git comes up in almost every developer interview. The questions are usually simple, but they want clear, confident answers. Let's practise the most common ones. Try answering each one out loud, before you hear the answer.

- Git is in almost every interview
- Simple questions
- Clear, confident answers
What is the difference between Git and GitHub?
Question one. What's the difference between Git and GitHub? A strong answer. Git is a distributed version control system, a program that tracks changes in your files, on your own computer. GitHub is a hosting service for Git repositories, which adds collaboration features like pull requests, issues, and Actions.
Git
- Version control tool
- Runs on your computer
- Works offline
GitHub
- Hosting service
- Pull requests, issues
- Actions, Pages
Explain the staging area
Question two. What is the staging area? It's the middle step between your working folder and the repository. Git add puts changes there, so you can choose exactly what goes into the next commit. It lets you split your work into clean, focused commits.
- Working folderyour edits
- git addchoose changes
- Staging areathe next commit
- git commitsaved in history

What is a commit?
Question three. What is a commit? A commit is a snapshot of the project at a point in time. It records the files, the author, the date, a message, and a pointer to its parent commit. It's identified by a unique hash, built from its content.
Summary
Git versus GitHub, the staging area, and what a commit is. Three answers you should know by heart. Next, questions about branches and merging.
Key takeaways- Git ≠ GitHub
- Staging = choosing
- Commit = snapshot + metadata