wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

git and github

Total questions: 10

Worksheet time: 2mins

Name
Class
Date
1.

1.Which of the following is the correct way to initialize a new Git repository?

a)

git add .

b)

git init

c)

git commit

2.

2.You can type git status at any point while in a git controlled directory to check the status of your files?

a)

True

b)

False

3.

3.Which of the following commands will stage your entire directory and every non-empty directory inside your current directory?

a)

git status all

b)

git add .

c)

git commit all

4.

4.We've just created a new file called index.html. Which of the following will stage this one file so we can commit it?

a)

git add index.html

b)

git add new

c)

git commit index.html

5.

5.How would you commit this with the message "adding new authors to index"?

a)

git commit -m "adding new authors to index"

b)

git commit "adding new authors to index"

c)

git commit .

6.

6.Which of the following commands will allow you to change branches?

a)

git checkout

b)

git clone

c)

git add

d)

git commit

7.

7. What are the different options for git reset?

a)

--hard

b)

--soft

c)

--skip

d)

--mixed

8.

8.Git and GitHub are the same thing?

a)

True

b)

False

9.

9.Which of the following commands will create a new branch?

a)

git checkout new-branch

b)

git checkout -b new-branch

c)

git clone new-branch

d)

git create-branch new-branch

10.

10.Staging, or git add, is required before creating a commit?

a)

True

b)

False