wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Introduction to Git and Github

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the command to initialize a Git repository in a directory?

a)

git init

b)

init git

c)

git create

d)

git start

2.

What is the command to add files to the staging area in Git?

a)

git push

b)

git checkout

c)

git commit

d)

git add

3.

What command is used to confirm changes in Git?

a)

git commit

b)

git checkout

c)

git add

d)

git push

4.

What is the command to merge branches in Git?

a)

git merge

b)

git push

c)

git branch

d)

git commit

5.

What is the purpose of a remote repository in GitHub?

a)

Store and manage project versions collaboratively

b)

Share memes with other users

c)

Organize networking events for developers

d)

Create a local backup of the project

6.

How do you clone a remote repository in GitHub through the command line?

a)

git clone

b)

git commit

c)

git add

d)

git pull

7.

What is the basic workflow in Git?

a)

Open, copy, paste, save as

b)

Clone, make changes, add, commit, push

c)

Download, edit, delete, save

d)

Create, move, rename, delete

8.

What is the command to create a new branch in Git?

a)

git checkout -b branch_name

b)

git branch branch_name

c)

git add branch_name

d)

git commit -m branch_name

9.

What command is used to view the commit history in Git?

a)

git history

b)

git status

c)

git log

d)

git show

10.

What is the command to undo uncommitted changes in Git?

a)

git reset --hard

b)

git commit -m 'message'

c)

git checkout -- .

d)

git add .