Git Quiz
Check how well you know Git and GitHub. Choose an answer for each question and read the explanation.
Before You Start
- Try every question without looking at the lessons
- If you are not sure, practise the command in a test repository
- Aim for 8 or more correct out of 10
Quiz Questions
Exercise
1. What is the difference between Git and GitHub?
Exercise
2. Which command turns the current folder into a Git repository?
Exercise
3. What is the correct order to save a change?
Exercise
4. Which command shows the exact lines you changed but have not staged yet?
Exercise
5. Which command undoes a commit by adding a new opposite commit?
Exercise
6. What does git switch -c feature do?
Exercise
7. When does a merge conflict happen?
Exercise
8. What does git pull do?
Exercise
9. What is the normal way to propose changes for review on GitHub?
Exercise
10. Which file should be listed in .gitignore?
What Next?
Excellent work! Put a real project on GitHub, write a good README, and open a pull request to your own repository to practise the workflow. Next, see the Tools tutorial to learn VS Code, the terminal and how to deploy your GitHub project to a hosting service.
