GitHub MCQs with answers Page - 11

Here, you will find a collection of MCQ questions on GitHub. 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

S

Satya • 3.38K Points
Extraordinary

Q. What is the difference between 'git stash' and 'git reset'?

  • (A) Stash deletes changes, reset stores them
  • (B) Stash stores changes temporarily, reset moves HEAD and staging
  • (C) Reset is permanent, stash is not
  • (D) There is no difference

A

Admin • 831.35K Points
Coach

Q. Which GitHub feature allows users to suggest changes without writing code?

  • (A) Pull Requests
  • (B) Issues
  • (C) Commits
  • (D) Forks

A

Admin • 831.35K Points
Coach

Q. Which command is used to clone a GitHub repository?

  • (A) git copy
  • (B) git init
  • (C) git clone
  • (D) git fork

A

Admin • 831.35K Points
Coach

Q. What does the .gitignore file do?

  • (A) Tracks all Git activity
  • (B) Stores Git credentials
  • (C) Lists files Git should not track
  • (D) Automatically merges branches

A

Admin • 831.35K Points
Coach

Q. What is a pull request in GitHub?

  • (A) A command to download code
  • (B) A request to fork a repository
  • (C) A request to merge code from one branch to another
  • (D) A tool to reset a branch

A

Admin • 831.35K Points
Coach

Q. What is GitHub Forking used for?

  • (A) Deleting a project
  • (B) Copying a repository to your own account
  • (C) Creating a backup
  • (D) Merging code automatically

A

Admin • 831.35K Points
Coach

Q. Which command stages a file named 'file.txt'?

  • (A) git stage file.txt
  • (B) git commit file.txt
  • (C) git add file.txt
  • (D) git push file.txt

A

Admin • 831.35K Points
Coach

Q. Which section of a GitHub repo allows you to write documentation?

  • (A) README.md
  • (B) ISSUES.md
  • (C) ABOUT.txt
  • (D) SETUP.ini

A

Admin • 831.35K Points
Coach

Q. What is the main purpose of branching in Git?

  • (A) To delete code
  • (B) To rename commits
  • (C) To work on features or fixes independently
  • (D) To ignore files

A

Admin • 831.35K Points
Coach

Q. How can you view the history of commits in a Git repository?

  • (A) git view
  • (B) git show-all
  • (C) git history
  • (D) git log

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