wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Git Quiz

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.
What does Git help you track?
a)
File sizes
b)
Document versions
c)
Project deadlines
d)
Keyboard shortcuts
2.

What Git command is used to save a snapshot of your staged changes? git (a)  

3.
Which of the following are GitHub use cases?
a)
Collaborative coding
b)
Tracking changes
c)
Designing logos
d)
Publishing code
4.
What does `git add` do?
a)
Commits the changes
b)
Uploads files to GitHub
c)
Stages changes for a commit
d)
Deletes local branches
5.

Fill in the blank: The default branch in most Git repositories is called (a)   .

6.
Which of these tools can help visualize Git logs in VS Code?
a)
Git Log Pro
b)
Git Viewer
c)
Git Graph
d)
Git TreeView
7.
Why is branching useful in Git?
a)
It reduces file sizes
b)
It helps avoid merge conflicts
c)
It prevents breaking the main branch
d)
It deletes unused code
8.
What does `git commit` do?
a)
Pushes code to GitHub
b)
Saves staged changes
c)
Starts a new branch
d)
Deletes tracked files
9.
Why should you avoid committing too many changes at once?
a)
It slows down GitHub
b)
It makes rollbacks harder
c)
It hides the commit history
d)
It clutters the terminal
10.
Which files should you avoid tracking in Git?
a)
Credentials
b)
Raw data
c)
Python scripts
d)
Temporary cache files
11.

If you see a message that your branch is “behind origin/main,” what does that mean?

a)

Your computer is not connected to the internet

b)

There are new commits on GitHub you don’t have locally

c)

Your repository has no commits yet

d)

You need to reinitialize Git

12.
When should you delete a branch in Git?
a)
After merging to main
b)
After creating a pull request
c)
After 10 commits
d)
Whenever conflicts appear
13.
What command is used to retrieve others’ code from GitHub?
a)
push
b)
clone
c)
fetch
d)
pull
14.
Which command uploads your local commits to a remote repository?
a)
git fetch
b)
git clone
c)
git pull
d)
git push