• Admin
  • 10th Feb, 2023

GIT MCQ Questions

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?

  • A. git fetch
  • B.git log -n
  • C.git config
  • D.git status

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

  • A. git clean -f
  • B.git config --global user.email
  • C.git merge --no-ff
  • D.git email--amend

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

  • A. git log --oneline
  • B.git reset --hard
  • C.git log --author=""
  • D.git rebase

4) ___________________ removes untracked files from your working directory.

  • A. git commit
  • B.git clean -f
  • C.git clean
  • D.git reset

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

  • A. git reset
  • B.git log ..
  • C.git init
  • D.git init --bare
Download Free : GIT MCQ PDF

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

  • A. git config --list
  • B.git help
  • C.git fetch
  • D.git log -n

7) Git command to compare two specified branches

  • A. git diff ...
  • B.git merge
  • C.git blame -L ,
  • D.git push --tags

8) _____________ command renames the current branch to

  • A. git remote rm
  • B.git branch -m
  • C.git branch -D (CAPS)
  • D.git rebase

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

  • A. git branch
  • B.git remote -v
  • C.git log -p
  • D.git log

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

  • A. Git Bash
  • B.GitHub
  • C.Git Boot
  • D.Git Lab

11) In Git, if you want to make your local repository reflect changes that have been made in a remote (tracked) repository, you should run the pull command

  • A. True
  • B.False

12) If you want to make radical changes to your team’s project and don’t want to impact the rest of the team, you should implement your changes in -

  • A. the root
  • B.a tag
  • C.the trunk
  • D.None of the above

13) The Git clone command does which of the following?

  • A. Makes a local copy of the repository
  • B.Creates a working directory
  • C.Commits a new branch
  • D.Both 1 & 2

14) Which one of the following is not part of the data structure of a Git repository?

  • A. Branch pointer
  • B.Body element
  • C.Commit object
  • D.Head pointer

15) Which of these Git client commands creates a copy of the repository and a working directory in the client’s workspace.

  • A. checkout
  • B.clone
  • C.import
  • D.update

16) Git is a .................... Version Control tool.

  • A. Decentralized
  • B.Centralized

17) GIT belongs to the............. generation of Version Control tools

  • A. 2nd
  • B.3rd
  • C.4th
  • D.5th

18) The main objectives of Git are -

  • A. speed
  • B.data integrity
  • C.support for distributed non-linear workflows
  • D.All of the above

19) What language is used in Git?

  • A. C
  • B.HTML
  • C.PHP
  • D.C++

20) Git command .................... used to give tags to the specified commit.

  • A. git checkout [branch name]
  • B.git show [commit]
  • C.git tag [commitID]
  • D.git rm [file]

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

JavaScript MCQ
Maven MCQ
Fortran MCQ
Power BI MCQ