wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

GITHUB

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

You just made a mistake in a git repo. Which command shall undo this misktake

a)

git clone

b)

git init

c)

git restore .

d)

git config -l

2.

Which command initializes a new Git repository?

a)

git start

b)

git init

c)

git new

d)

git create

3.

Which command sets the global username ?

a)

git config --global user.name "Your Name"

b)

git config -l

c)

git push

d)

git init

4.

Which command shows the commit history?

a)

git status

b)

git log

c)

git init

d)

git add .

5.

When you clone a public repo the name of the remote repo by default is

a)

git

b)

github

c)

origin

d)

remote

6.

Which key do you paste in github ?

a)

Public Key

b)

Private Key

7.

The first commands to run after just installing git in pc is

a)

git config --global

b)

git log

c)

git push

d)

git pull

8.

When you run git add . the files are moved to

a)

staging area

b)

version database

c)

remote repo

9.

The command to check existing git configuration

a)

git status

b)

git init

c)

git log

d)

git config -l

10.

Command to discard all changes since the last commit.

a)

git reset --hard

b)

git reset --soft HEAD~1

11.

Command to undo the last commit and discard all changes

a)

git reset --hard HEAD~1

b)

git reset --mixed HEAD~1

12.

Command to find name of existing branch

a)

git status

b)

git log

c)

git branch

d)

git init

13.

Anyone can push to a public Github repo.

a)

True

b)

False

14.

When you add collaborator to a public repo, he/she can push to the repo.

a)

True

b)

False

15.

A public github repo can be viewed and cloned by anyone.

a)

True

b)

False

16.

You cloned a github repo. You want to find out the name of the remote repo. Which command do you use ?

a)

git status

b)

git config -l

c)

git branch

d)

git log