wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Git & GitHub

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

This git command creates an empty Git repo in the specified directory.

a)

init

b)

add

c)

status

d)

log

2.

Git command used to display the entire commit history.

a)

init

b)

add

c)

status

d)

log

3.

Git ______ stage all the changes in the project directory.

a)

add

b)

status

c)

log

d)

clone

4.

This flag is added when we want to add a message when committing the staged snapshot.

a)

-m

b)

--m

c)

--message

d)

commit

5.

Which of the following commands is used to add a remote connection to a remote repo.

a)

git remote add

b)

git add remote

c)

git remote -add

d)

git pull

6.

Which of the following commands is used to create a new branch.

a)

git checkout <branch name>

b)

git branch <branch name>

c)

git merge <branch name>

d)

git fetch

7.

Git command used to upload local repo to the remote repository.

a)

push

b)

upload

c)

remote

d)

pull

8.

This list the files that are unstaged, staged, and untracked.

a)

status

b)

list

c)

log

d)

diff

9.

A special file that is used in Git to tell which files and directories to ignore when making a commit.

a)

.gitignore

b)

ignore-files

c)

.ignore

d)

config

10.

Which of the following commands is used to define the author name to use for all commits in the current repo.

a)

config user.name

b)

config name

c)

config user

d)

config username