Git MCQs with answers Page - 9

Here, you will find a collection of MCQ questions on Git. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 828.03K Points
Coach

Q. What does git describe do?

  • (A) Shows commit diff
  • (B) Generates a human-readable commit name
  • (C) Shows branch details
  • (D) Explains commit

A

Admin • 828.03K Points
Coach

Q. Which command temporarily disables hooks?

  • (A) git commit --no-hooks
  • (B) git commit --no-verify
  • (C) git push --force
  • (D) git hook off

A

Admin • 828.03K Points
Coach

Q. Which command renames a remote?

  • (A) git remote rename
  • (B) git remote move
  • (C) git remote -m
  • (D) git remote change

A

Admin • 828.03K Points
Coach

Q. What does git worktree allow?

  • (A) Multiple remotes
  • (B) Multiple working directories
  • (C) Multiple users
  • (D) Multiple staging areas

A

Admin • 828.03K Points
Coach

Q. Which command prunes deleted remote branches?

  • (A) git remote clean
  • (B) git fetch --prune
  • (C) git branch --delete
  • (D) git pull --clean

A

Admin • 828.03K Points
Coach

Q. Which Git command shows object contents?

  • (A) git inspect
  • (B) git cat-file
  • (C) git show-object
  • (D) git object

A

Admin • 828.03K Points
Coach

Q. Which command compresses Git objects?

  • (A) git pack
  • (B) git gc
  • (C) git compress
  • (D) git zip

A

Admin • 828.03K Points
Coach

Q. Which Git feature allows automation on events?

  • (A) Aliases
  • (B) Hooks
  • (C) Submodules
  • (D) Tags

A

Admin • 828.03K Points
Coach

Q. Which command shows the difference between two commits?

  • (A) git diff commit1 commit2
  • (B) git compare commit1 commit2
  • (C) git log commit1 commit2
  • (D) git show commit1 commit2

A

Admin • 828.03K Points
Coach

Q. Which command is used to list all configured aliases?

  • (A) git alias
  • (B) git config --list
  • (C) git config --get alias
  • (D) git aliases

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ