GIT MCQ Quiz

Take GIT Quiz To test your Knowledge 

Below are few GIT MCQ tests that check your basic knowledge of GIT. This GIT Test contains around 20 questions of multiple choice with 4 options. You have to select the right answer to a question. You can see the correct answer by clicking view answer link.

Also, Read Best GIT interview questions.

1. Which Command is used to show limited number of commits?

  • git fetch <remote>
  • git log -n <limit>
  • git config <limit>
  • git status
View Answer

2. Which command defines the author email to be used for all commits by the current user.

  • git clean -f <path>
  • git config --global user.email <email>
  • git merge --no-ff <email>
  • git email--amend
View Answer

3. ____________ command is useful for getting a high-level overview of the project history.

  • git log --oneline
  • git reset --hard
  • git log --author="<pattern>"
  • git rebase <base>
View Answer

4. ___________________ removes untracked files from your working directory.

  • git commit
  • git clean -f <path>
  • git clean
  • git reset
View Answer

5. Which command creates an empty Git repository in the specified directory?

  • git reset <file>
  • git log <since>..<until>
  • git init <directory>
  • git init --bare <directory>
View Answer

6. Command to download all the objects and references from a specified repository

  • git config --list
  • git help <command>
  • git fetch <remote>
  • git log -n <limit>
View Answer

7. Git command to compare two specified branches

  • git diff <first-branch>...<second-branch>
  • git merge <fetched-remote-name> <branch-name>
  • git blame -L <start>,<end> <filename>
  • git push <remote> --tags
View Answer

8. _____________ command renames the current branch to <branch>

  • git remote rm <name>
  • git branch -m <branch>
  • git branch -D <branch> (CAPS)
  • git rebase <base>
View Answer

9. Which Git command displays the patch representing each commit.

  • git branch
  • git remote -v
  • git log -p
  • git log
View Answer

10. Which of the following command line environment is used for interacting with Git ?

  • Git Bash
  • GitHub
  • Git Boot
  • Git Lab
View Answer

Write For Us.

Contribute the Community.