Git & Github Quiz

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science) |
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Abdo Mosa
A
Abdo Mosa
Community Contributor
Quizzes Created: 1 | Total Attempts: 9,052
Questions: 15 | Attempts: 9,052

SettingsSettingsSettings
Git & Github Quiz - Quiz

This is an MCQ quiz to test the basics and essentials of Git & GitHub. Do you think you can pass this GIT & GitHub quiz? Git is a free and open-source software that is for distributed version control: it tracks changes in any set of files. The software is usually used for coordinating work among programmers while developing source code during software development. So, what do you know of it? Well, we are going to find out soon.


Questions and Answers
  • 1. 

    Who is attributed with inventing GIT?

    • A.

      Junio C. Hamano

    • B.

      James Gosling

    • C.

      Koska Kawaguchi

    • D.

      Linus Torvalds

    Correct Answer
    D. Linus Torvalds
    Explanation
    Linus Torvalds is attributed with inventing GIT. He is a Finnish-American software engineer who created the distributed version control system in 2005. GIT was developed to manage the Linux kernel development, and it has since become widely used in the software development industry. Torvalds' invention of GIT revolutionized the way developers collaborate and track changes in their code, making it easier to manage large-scale projects with multiple contributors.

    Rate this question:

  • 2. 

    Which of these terms best describes GitHub?

    • A.

      Integrated Development Environment

    • B.

      Distributed Version Control System

    • C.

      Issue Tracking System

    • D.

      Web-Based Repository Hosting Service

    Correct Answer
    D. Web-Based Repository Hosting Service
    Explanation
    GitHub is a web-based repository hosting service that allows users to store and manage their code repositories. It provides a platform for developers to collaborate on projects, track changes, and manage versions of their code using a distributed version control system. While it also offers features like issue tracking and integration with various development tools, the primary function of GitHub is to host and provide access to code repositories over the internet.

    Rate this question:

  • 3. 

    What is the opposite of a GIT clone?

    • A.

      GIT push

    • B.

      GIT add

    • C.

      GIT upload

    • D.

      GIT status

    Correct Answer
    A. GIT push
    Explanation
    The opposite of a GIT clone is a GIT push. A GIT clone is used to create a local copy of a repository from a remote source, while a GIT push is used to upload the local changes to the remote repository. So, while a clone brings the repository to the local machine, a push sends the local changes back to the remote repository.

    Rate this question:

  • 4. 

    What command do you run to view the commit history of your repository?

    • A.

      GIT history

    • B.

      GIT log

    • C.

      GIT commit -h

    • D.

      GIT past

    Correct Answer
    B. GIT log
    Explanation
    To view the commit history of a repository, you would run the command "GIT log". This command will display a list of all the commits made in the repository, including the commit message, author, date, and unique commit hash. It provides a chronological view of all the changes and updates made to the repository over time.

    Rate this question:

  • 5. 

    How do you check the state of your local git repository since your last commit?

    • A.

      GIT check

    • B.

      GIT status

    • C.

      GIT commit

    • D.

      GIT diff

    Correct Answer
    B. GIT status
    Explanation
    To check the state of your local git repository since your last commit, you can use the "GIT status" command. This command provides information about any changes made to the repository, such as modified files or untracked files. It allows you to see the current status of your repository and helps you keep track of your changes before committing them.

    Rate this question:

  • 6. 

    What's a shortcut to staging all the changes you have?

    • A.

      GIT commit add

    • B.

      GIT commit

    • C.

      GIT add

    • D.

      GIT stage -a

    Correct Answer
    C. GIT add
    Explanation
    The correct answer is "GIT add". This command is used to stage all the changes you have made in your local repository. It allows you to prepare the changes for the next commit. By using "GIT add", you are indicating to Git which files or changes you want to include in the next commit. This is an essential step in the Git workflow as it helps in organizing and tracking changes effectively.

    Rate this question:

  • 7. 

    How do you supply a commit message to a commit?

    • A.

      GIT message "I'm coding!"

    • B.

      GIT add "I'm coding!"

    • C.

      GIT commit "I'm coding!"

    • D.

      GIT commit -m "I'm coding!"

    Correct Answer
    D. GIT commit -m "I'm coding!"
    Explanation
    To supply a commit message to a commit in GIT, the correct way is to use the command "GIT commit -m "I'm coding!". This command allows the user to add a specific message to the commit, in this case, "I'm coding!". The "-m" flag is used to specify that the following text should be treated as the commit message. This helps in providing a clear and concise description of the changes made in the commit.

    Rate this question:

  • 8. 

    What's the git command that downloads your repository from GitHub to your computer?

    • A.

      GIT push

    • B.

      GIT fork

    • C.

      GIT clone

    • D.

      GIT commit

    Correct Answer
    C. GIT clone
    Explanation
    The correct answer is GIT clone. This command is used to download a copy of a repository from GitHub to your local computer. It creates a new directory on your computer with the same name as the repository and copies all the files and commit history from the remote repository to your local machine. This allows you to work on the project locally and make changes before pushing them back to the remote repository.

    Rate this question:

  • 9. 

    Which is the correct usage of the push command?

    • A.

      GIT push <remote> <branch>

    • B.

      GIT push <branch> <remote>

    • C.

      Both correct

    • D.

      None of them

    Correct Answer
    A. GIT push <remote> <branch>
    Explanation
    The correct usage of the push command is "GIT push ". This command is used to push the local branch to the specified remote repository. By specifying the remote and branch in this order, the changes made in the local branch will be pushed to the corresponding branch in the remote repository.

    Rate this question:

  • 10. 

    What is the correct order to submit your changes from the working directory all the way to the remote repository?

    • A.

      GIT add, git commit, git push

    • B.

      GIT add, git push, git commit

    • C.

      GIT commit, git add, git push

    • D.

      GIT push, git add, git commit

    Correct Answer
    A. GIT add, git commit, git push
    Explanation
    The correct order to submit changes from the working directory all the way to the remote repository is to first use "git add" to stage the changes, then use "git commit" to commit the changes to the local repository, and finally use "git push" to push the committed changes to the remote repository. This order ensures that the changes are properly staged, committed, and then pushed to the remote repository for others to access and view.

    Rate this question:

  • 11. 

    Which of these terms best describes git?

    • A.

      Integrated Development Environment

    • B.

      Distributed Version Control System

    • C.

      Issue Tracking System

    • D.

      Web-Based Repository Hosting Service 

    Correct Answer
    B. Distributed Version Control System
    Explanation
    Git is a distributed version control system, which means it allows multiple users to collaborate on a project by tracking and managing changes to the source code. Unlike centralized version control systems, Git does not rely on a central server, allowing each user to have their own copy of the entire project history. This enables users to work offline and merge their changes with others seamlessly. Git also provides features like branching and merging, making it a powerful tool for software development teams.

    Rate this question:

  • 12. 

    Which of the following commands show changes between commits?

    • A.

      GIT commit

    • B.

      GIT reset

    • C.

      GIT diff

    • D.

      GIT show

    Correct Answer
    C. GIT diff
    Explanation
    The correct answer is "GIT diff". The "GIT diff" command is used to show the changes between commits. It compares the differences in the content of files between two commit snapshots and displays the added, modified, or deleted lines. This command is commonly used to review changes before committing them or to compare different versions of a file.

    Rate this question:

  • 13. 

    Which of the following commands join two or more development histories together?

    • A.

      GIT merge

    • B.

      GIT concat

    • C.

      GIT join

    • D.

      GIT branch

    Correct Answer
    A. GIT merge
    Explanation
    The correct answer is GIT merge. The merge command in Git is used to combine two or more development histories together. It allows changes from one branch to be integrated into another branch, effectively joining the development histories of those branches. This is commonly used when working with feature branches or when incorporating changes from multiple contributors into a main branch.

    Rate this question:

  • 14. 

    Which of the following commands is used in switching between branches?

    • A.

      GIT checkout

    • B.

      GIT switch

    • C.

      GIT merge

    • D.

      Both A and B

    Correct Answer
    D. Both A and B
    Explanation
    The command "GIT checkout" or "GIT switch" is used in switching between branches in Git. When we use this command followed by the name of the branch we want to switch to, Git updates the files in our working directory to match the version of the files in that branch. This allows us to easily move between different branches and work on different features or bug fixes.

    Rate this question:

  • 15. 

    Which of the following commands is used to reset the current HEAD to the specified state?

    • A.

      GIT reset

    • B.

      GIT restore

    • C.

      GIT checkout

    • D.

      GIT diff

    Correct Answer
    A. GIT reset
    Explanation
    GIT reset command is used to reset the current HEAD to the specified state. This command allows the user to move the HEAD and the branch pointer to a different commit, effectively undoing the changes made after that commit. It can be used to unstage files or to completely remove commits from the branch history.

    Rate this question:

Godwin Iheuwa |MS (Computer Science) |
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 13, 2024
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Feb 08, 2020
    Quiz Created by
    Abdo Mosa
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.