GitHub MCQs with answers Page - 6

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. How can you contribute to documentation in a GitHub repo?

  • (A) Edit the README file and open a pull request
  • (B) Comment on commits
  • (C) Star the repo
  • (D) Send a private message

S

Satya • 3.38K Points
Extraordinary

Q. What does the command 'git branch feature' do?

  • (A) Switches to a branch called feature
  • (B) Deletes the feature branch
  • (C) Creates a new branch named feature
  • (D) Renames the current branch to feature

S

Satya • 3.38K Points
Extraordinary

Q. Which GitHub tool helps visualize code contribution activity?

  • (A) Insights > Contributors graph
  • (B) Stars
  • (C) Forks
  • (D) Projects tab

S

Satya • 3.38K Points
Extraordinary

Q. What does 'git diff' show?

  • (A) All commits in the repository
  • (B) Differences between two branches
  • (C) Differences between staged and unstaged files
  • (D) All branches in Git

S

Satya • 3.38K Points
Extraordinary

Q. Which command stages all modified files for commit?

  • (A) git add .
  • (B) git stage *
  • (C) git commit -a
  • (D) git update

S

Satya • 3.38K Points
Extraordinary

Q. Which GitHub feature can be used to automate code formatting and linting?

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

S

Satya • 3.38K Points
Extraordinary

Q. What is the purpose of GitHub Sponsors?

  • (A) To sell GitHub accounts
  • (B) To receive financial support for open-source contributions
  • (C) To advertise repositories
  • (D) To block forks

S

Satya • 3.38K Points
Extraordinary

Q. Which GitHub feature lets you explore trending projects?

  • (A) GitHub Projects
  • (B) GitHub Topics
  • (C) GitHub Explore
  • (D) GitHub Stars

S

Satya • 3.38K Points
Extraordinary

Q. What file extension is typically used for writing GitHub workflows?

  • (A) .txt
  • (B) .yml
  • (C) .cfg
  • (D) .md

S

Satya • 3.38K Points
Extraordinary

Q. Which of these commands is used to rename a Git branch?

  • (A) git change
  • (B) git rename
  • (C) git branch -m
  • (D) git name