GitHub MCQs with answers Page - 7

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. Which symbol is used in GitHub to refer to an issue number?

  • (A) @
  • (B) &
  • (C) #
  • (D) %

S

Satya • 3.38K Points
Extraordinary

Q. What is the significance of 'origin' in Git?

  • (A) It refers to the latest commit
  • (B) It is the default name for a remote repository
  • (C) It tracks old branches
  • (D) It refers to the main branch only

S

Satya • 3.38K Points
Extraordinary

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

  • (A) Saves changes to a new branch
  • (B) Resets your GitHub password
  • (C) Undoes commits and changes based on options
  • (D) Deletes the repository

S

Satya • 3.38K Points
Extraordinary

Q. What does the 'HEAD' pointer in Git represent?

  • (A) The first commit
  • (B) The default branch
  • (C) The latest commit on the current branch
  • (D) The last branch created

S

Satya • 3.38K Points
Extraordinary

Q. What does it mean to star a GitHub repository?

  • (A) To fork it
  • (B) To mark it as your own
  • (C) To show appreciation or bookmark it
  • (D) To close it

S

Satya • 3.38K Points
Extraordinary

Q. Where are GitHub workflows stored?

  • (A) .github/workflows
  • (B) src/workflows
  • (C) docs/actions
  • (D) config/ci

S

Satya • 3.38K Points
Extraordinary

Q. Which command is used to remove files from the staging area in Git?

  • (A) git rm --cached filename
  • (B) git delete filename
  • (C) git remove filename
  • (D) git discard filename

S

Satya • 3.38K Points
Extraordinary

Q. How do you squash multiple commits into one in Git?

  • (A) git compress
  • (B) git squash
  • (C) git rebase -i
  • (D) git merge --squash

S

Satya • 3.38K Points
Extraordinary

Q. Which command lists all the branches in your local repository?

  • (A) git list
  • (B) git branch
  • (C) git status -b
  • (D) git show

S

Satya • 3.38K Points
Extraordinary

Q. What is a 'conflict' in Git?

  • (A) A type of commit
  • (B) A mismatch between different GitHub versions
  • (C) When Git cannot automatically merge changes
  • (D) A deleted repository

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