wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Git basics

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

Which of these terms best describes git?

a)

Integrated development environment

b)

Issue tracking system

c)

Distributed Version control system

d)

Web-based repository hosting service

2.

Which command allows me to view my repository's history?

a)

git commits

b)

git log

c)

git commit --history

d)

git history

3.

What is the "staging area"?

a)

It is the current area of work, with the files of the project

b)

It is the content of the .git/ directory, with the information collected by git

c)

It is current position in the history log for the current branch

d)

It is the set of files that will form part of the next commit

4.

How can I add a file to the staging area?

a)

git add file.txt

b)

git commit file.txt

5.

Which is the correct order to submit your changes from the working directory to the remote repository?

a)

git add, git push, git commit

b)

git add, git commit, git push

c)

git push, git add, git commit

d)

git commit, git add, git push

6.

Github and Gitlab are simply a "Git-as-a-service"

a)

True

b)

False

7.

I interactively rebased "main" branch on my computer and changed commits order. Can I safely force push on the remote?

a)

Yes

b)

No

8.

Which of the following commands will result in the changes of "some" branch being included into "another" branch?

(multiple choices allowed)

a)

git checkout some;

git merge another;

b)

git checkout another;

git merge some;

c)

git checkout another;

git rebase some

d)

git checkout another;

git rebase -i some

9.

Which of the following propositions are NOT true about Git?

(multiple choices allowed)

a)

It can help me to be more efficient

b)

It prevents bugs and regressions in the codebase

c)

It helps me to work with my colleagues

d)

It allows to get back to a previous state of the codebase

10.

I'm working on a local branch, 'foo', based on develop since a few days. A colleague just pushed on develop a bug fix that I need within my own branch 'foo'. What can I do (assuming I'm currently on 'foo')?

(multiple choices allowed)

a)

git pull;

b)

git fetch; git rebase origin/develop;

c)

git merge develop;

d)

git rebase develop;