Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Git Pre-Assessment Quiz (Basic Level)

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is Git primarily used for?

a)

Editing images

b)

Managing source code versions

c)

Running servers

d)

Building mobile apps

2.

Which command initializes a new Git repository in the current directory?

a)

git start

b)

git begin

c)

git init

d)

git create

3.

Which command shows the current state of the working directory and staging area, including tracked and untracked files?

a)

git log

b)

git diff

c)

git status

d)

git show

4.

Which command is used to record staged changes as a new snapshot in the repository history?

a)

git save

b)

git commit

c)

git push

d)

git add

5.

What is the primary purpose of the git clone command?

a)

Create a new branch

b)

Copy a remote repository to your local machine

c)

Delete a repository

d)

Upload local changes to GitHub

6.

Which command stages file changes so they will be included in the next commit?

a)

git add

b)

git commit

c)

git merge

d)

git branch

7.

What does git push do in a typical workflow with a configured remote?

a)

Saves changes only on the local machine

b)

Sends committed changes to a remote repository

c)

Creates a brand-new repository on disk

d)

Deletes branches that were merged

8.

Which command retrieves new commits from a remote repository without merging them into the current branch?

a)

git fetch

b)

git pull

c)

git update

d)

git merge

9.

What is the purpose of a .gitignore file in a repository?

a)

To track ignored files explicitly

b)

To list files Git should not track

c)

To delete unnecessary files during cleanup

d)

To list all commits in the project

10.

You need to create an independent line of development for a new feature. Which command creates the branch without switching to it?

a)

git checkout -b featureX

b)

git branch featureX

c)

git switch featureX

d)

git clone featureX