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)
By Abdo Mosa
A
Abdo Mosa
Community Contributor
Quizzes Created: 1 | Total Attempts: 9,655
| Attempts: 9,655 | Questions: 15
Please wait...
Question 1 / 15
0 %
0/100
Score 0/100
1. How do you supply a commit message to a commit?

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.

Submit
Please wait...
About This Quiz
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... see morea 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.
see less

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

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.

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

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.

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

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.

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

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.

Submit
6. Which of the following commands show changes between commits?

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.

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

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.

Submit
8. What is the opposite of a GIT clone?

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.

Submit
9. Who is attributed with inventing GIT?

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.

Submit
10. Which of these terms best describes git?

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.

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

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.

Submit
12. Which is the correct usage of the push command?

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.

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

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.

Submit
14. Which of these terms best describes GitHub?

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.

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

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.

Submit
View My Results
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 (Updated): Feb 13, 2024 +

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
Cancel
  • All
    All (15)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
How do you supply a commit message to a commit?
Which of the following commands join two or more development histories...
How do you check the state of your local git repository since your...
What's the git command that downloads your repository from GitHub...
What command do you run to view the commit history of your repository?
Which of the following commands show changes between commits?
What is the correct order to submit your changes from the working...
What is the opposite of a GIT clone?
Who is attributed with inventing GIT?
Which of these terms best describes git?
Which of the following commands is used to reset the current HEAD to...
Which is the correct usage of the push command?
What's a shortcut to staging all the changes you have?
Which of these terms best describes GitHub?
Which of the following commands is used in switching between branches?
Alert!

Advertisement