wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Git and Github Quiz

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

What is the main purpose of using Git?

a)

Running code faster

b)

Version control & tracking changes

c)

Hosting websites

d)

Designing UI

2.

Which command sets global Git username?

a)

git set username

b)

git config --global user.name

c)

git global username

d)

git add user

3.

`git init` converts a folder into:

a)

A GitHub repository

b)

A local Git repository

c)

A cloud backup

d)

A compressed zip file

4.

What must be done before a file can be committed?

a)

Rename the file

b)

Push the file

c)

Stage the file

d)

Delete the file

5.

The command `git add .` does what?

a)

Deletes all files

b)

Stages all modified files

c)

Stages only a specific file

d)

Pushes all files

6.

Which command links local repo to GitHub?

a)

git add origin

b)

git remote add origin

c)

git upload origin

d)

git merge origin

7.

Which command is used to clone a remote repo?

a)

git copy

b)

git clone

c)

git download repo

d)

git fetch clone

8.

What is a branch in Git?

a)

A duplicate repository

b)

A separate line of development

c)

A backup of Git logs

d)

A pull request

9.

A 'fork' in GitHub refers to:

a)

Cloning a repository into your account

b)

Deleting a repo

c)

Creating a new branch

d)

Editing code online

10.

Contributions in open source usually involve:

a)

Playing games

b)

Submitting pull requests

c)

Only writing comments

d)

Following creators

11.

Which command shows all existing branches?

a)

git branches

b)

git log

c)

git branch

d)

git list

12.

Which command creates AND switches to a new branch?

a)

git branch -new

b)

git switch -c <branchname>

c)

git create <branch>

d)

git open branch <name>

13.

What is the purpose of merging?

a)

To copy files

b)

To combine code from different branches

c)

To delete unwanted code

d)

To rename branches

14.

Before merging another branch into main, you must:

a)

Delete the old branch

b)

Switch to the main branch

c)

Install GitHub CLI

d)

Clone the repo again

15.

Merge conflicts happen when:

a)

Repo has no README

b)

Two branches modify the same line differently

c)

There is slow internet

d)

GitHub server is down