GitHub MCQs with answers Page - 5

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 • 2.31K Points
Master

Q. Which command initializes a new Git repository?

  • (A) git start
  • (B) git create
  • (C) git init
  • (D) git launch

S

Satya • 2.31K Points
Master

Q. What does the 'git add' command do?

  • (A) Commits changes to the repository
  • (B) Pushes code to GitHub
  • (C) Adds changes to the staging area
  • (D) Merges two branches

S

Satya • 2.31K Points
Master

Q. Which HTTP method is typically used when pushing code to GitHub?

  • (A) GET
  • (B) POST
  • (C) PUT
  • (D) PATCH

S

Satya • 2.31K Points
Master

Q. Which command is used to initialize a Git repository?

  • (A) git start
  • (B) git create
  • (C) git init
  • (D) git new

S

Satya • 2.31K Points
Master

Q. Which GitHub feature helps scan your code for security vulnerabilities?

  • (A) GitHub Gist
  • (B) GitHub Copilot
  • (C) GitHub Actions
  • (D) GitHub Code Scanning

S

Satya • 2.31K Points
Master

Q. What does a green checkmark next to a commit in GitHub usually indicate?

  • (A) The commit is signed
  • (B) Tests passed successfully
  • (C) The commit is outdated
  • (D) The commit has been reverted

S

Satya • 2.31K Points
Master

Q. How can you make a GitHub repository private?

  • (A) By changing the visibility in repository settings
  • (B) By renaming the repository
  • (C) By forking it to a new account
  • (D) By deleting all files

S

Satya • 2.31K Points
Master

Q. What does 'git config' do?

  • (A) Configures Git settings such as user info
  • (B) Commits files to remote
  • (C) Fetches the latest code
  • (D) Creates a new repository

S

Satya • 2.31K Points
Master

Q. What is the purpose of 'git stash'?

  • (A) Deletes files
  • (B) Temporarily shelves changes in the working directory
  • (C) Pulls updates from GitHub
  • (D) Creates a new branch

S

Satya • 2.31K Points
Master

Q. What does the 'git remote' command manage?

  • (A) Remote connections to other repositories
  • (B) Local commits only
  • (C) Branches
  • (D) File permissions

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