GitHub MCQs with answers Page - 8

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 GitHub feature allows you to create a documentation site from your repo?

  • (A) GitHub Wiki
  • (B) GitHub Pages
  • (C) GitHub Docs
  • (D) GitHub Actions

S

Satya • 3.38K Points
Extraordinary

Q. Which command updates your local branch with changes from the remote?

  • (A) git refresh
  • (B) git update
  • (C) git pull
  • (D) git push

S

Satya • 3.38K Points
Extraordinary

Q. What is the '.github' folder used for in a repository?

  • (A) To store source code files
  • (B) To store GitHub-specific files like workflows and issue templates
  • (C) To hold compiled binaries
  • (D) To manage Git history

S

Satya • 3.38K Points
Extraordinary

Q. Which file extension is typically used for GitHub Actions workflow files?

  • (A) .xml
  • (B) .yml
  • (C) .sh
  • (D) .conf

S

Satya • 3.38K Points
Extraordinary

Q. Which file would you edit to automatically run tests on push using GitHub Actions?

  • (A) .gitignore
  • (B) README.md
  • (C) .github/workflows/ci.yml
  • (D) .github/actions/test.js

S

Satya • 3.38K Points
Extraordinary

Q. Which GitHub feature lets you break down your project into smaller tasks?

  • (A) Stars
  • (B) Forks
  • (C) Projects
  • (D) Branches

S

Satya • 3.38K Points
Extraordinary

Q. What is the best way to avoid merge conflicts?

  • (A) Push directly to main
  • (B) Avoid using branches
  • (C) Regularly pull updates and communicate with team
  • (D) Delete unused repos

S

Satya • 3.38K Points
Extraordinary

Q. What is a commit hash?

  • (A) A version of a repository
  • (B) A unique identifier for a commit
  • (C) A secret password for pushing code
  • (D) A file that tracks branches

S

Satya • 3.38K Points
Extraordinary

Q. Which command stages all deleted files for commit?

  • (A) git rm *
  • (B) git add -A
  • (C) git delete --all
  • (D) git clean

S

Satya • 3.38K Points
Extraordinary

Q. What is the difference between 'git merge' and 'git rebase'?

  • (A) No difference at all
  • (B) Merge creates a new commit; rebase rewrites history
  • (C) Merge deletes the branch
  • (D) Rebase removes old commits

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