This quiz is part of the DevOpsTheHardWay course.

Please answer the quiz and click the "Test" button at the bottom right.

Git - Basics - multichoice questions

Question 1

Given:

$ git init testrepo
$ cd testrepo
$ git commit -m "my first commit"

What is wrong?

Question 2

When you clone a repository, which of the following statements is true?

Question 3

After running git add . (staging all files), what would be the output of git diff?

Question 4

What does the HEAD in Git represent?

Question 5

Given:

$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   test_it

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    DATA

Running git commit -a -m 'Add new benchmarks' will:

Question 6

Adding the -a option to the git commit command makes Git:

Question 7

Given:

$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   README

What is the status of the README?

Question 8

After modifying the config.json files in a repository, you decide to discard the changes. What command can you use?

license