Git Commands Quiz: Save your repository

You can play this quiz if you want to test your basic git commands. This quiz is the first step for testing your skills based on your git experience. Although it is about saving your repo, so you can expect questions only from git add, git commit, git push, git clone, git diff, git status etc. which are good to start with your git repo.

This git overview quiz has 10 questions only and you would get 10 minutes to solve all the questions. 70% is the passmark for this quiz by keeping in mind that you would need really good hands-on in git commands even it start with basics of it.

If you find any issue in the quiz, please mail us at learning@flexmind.coYou can also comment what you think about this quiz content.

Time limit: 0

Quiz Summary

0 of 10 questions completed

Questions:

1

2

3

4

5

6

7

8

9

10

Information

You have already completed the quiz before. Hence you can not start it again.

Quiz is loading…

You must sign in or sign up to start the quiz.

You must first complete the following:

Results

Quiz complete. Results are being recorded.

Results

0 of 10 questions answered correctly

Your time:

Time has elapsed

You have reached 0 of 0 point(s), (0)

Earned Point(s): 0 of 0, (0)0 Essay(s) Pending (Possible Point(s): 0)

Average score

Your score

Categories

git0%

1

2

3

4

5

6

7

8

9

10

Answered

Review

Question 1 of 10

1. Question

Command to copy a git remote repository and give repo name fm-test

git clone <remote-git-repo> fm-test

git clone fm-test <remote-git-repo>

If you do git clone, it will automatically create remote-git-name as a folder

git checkout <remote-git-repo> fm-test

Correct

Incorrect

Question 2 of 10

2. Question

Which command(s) you would need to run mandatorily to push remotely

git add, git commit

git commit, git pull

git add, git commit, git pull

git add, git log, git pull

Correct

Incorrect

Question 3 of 10

3. Question

I made a mistake in the last commit, I don’t want to add a new commit. Rather I want to add and edit in past commit. What should I run

git commit -c

git commit -a

git commit –amend

git commit -C

Correct

Incorrect

Question 4 of 10

4. Question

Which command to check which files are in stage, which files are modified etc?

git diff

git status

git log

git history

Correct

Incorrect

Question 5 of 10

5. Question

Shortcut command to add and commit together with inline commit message

git add -A

git commit -a

git commit -am

git commit -m

Correct

Incorrect

Question 6 of 10

6. Question

You want to upload the code to your remote git url, which git command you will run?

git fetch

git checkout

git push

git build

Correct

Incorrect

Question 7 of 10

7. Question

What this command does: git remote -v

A list of remote repositories your repo is connected to

The current git version you're running

Download remote repo with verbose mode enabled

Verify the remote repo server links

Correct

Incorrect

Question 8 of 10

8. Question

Where are the files stored before they are committed to the local repository?

Stashed Area

Cache Area

Staging Area

Squashed Area

Correct

Incorrect

Question 9 of 10

9. Question

Which are valid git log commands?

git log

git log -p -1

git log -3

git log –diff

Correct

Incorrect

Question 10 of 10

10. Question

I am working locally in a repo which is cloned from github, I want to update my local repo equivalent to github repo, which git command I should run

He is a seasoned professional having 10+ years of experience into Software Development, Python, AWS, Application Security and have an interest in Security Automation.

He is an author and technical reviewers of many technical books associated with PackT and Manning. When he gets free time, he use to work on his github projects which you can checkout here: Sanjeev’s Git hub repo