0% found this document useful (0 votes)
20 views6 pages

Git Git Hub Workshop Quiz Q

The document is a structured outline of a course on Git and GitHub, divided into four modules covering key concepts such as version control, branching, merging, collaboration, and advanced features. Each module contains multiple-choice questions designed to test knowledge on specific topics related to Git and GitHub functionalities. The content aims to provide learners with a comprehensive understanding of using Git and GitHub effectively.

Uploaded by

sarimane07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

Git Git Hub Workshop Quiz Q

The document is a structured outline of a course on Git and GitHub, divided into four modules covering key concepts such as version control, branching, merging, collaboration, and advanced features. Each module contains multiple-choice questions designed to test knowledge on specific topics related to Git and GitHub functionalities. The content aims to provide learners with a comprehensive understanding of using Git and GitHub effectively.

Uploaded by

sarimane07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Module 1: Introduction to Git and GitHub

1. What is the primary difference between Git and GitHub?


o A) Git is a Version Control System, GitHub is a hosting service with additional
collaboration features
o B) Git is a website for managing code, GitHub is a command-line tool for
executing Git commands
o C) Git and GitHub are interchangeable and serve the same function
o D) GitHub is an offline tool used to track local changes
2. Which of the following is NOT a version control system?
o A) Git
o B) SVN
o C) MySQL, a database management system
o D) Mercurial
3. In Git, what is the "Staging Area"?
o A) A space where commits are permanently stored
o B) An area where untracked files reside
o C) A space where changes are reviewed before committing
o D) A section where deleted commits are stored
4. Which command is used to create a new Git repository?
o A) git start
o B) git create-repo
o C) git init
o D) git new-repository
5. What does git clone do?
o A) Copies a repository from a remote location to the local machine
o B) Creates an identical branch within a repository
o C) Transfers files from one repository to another
o D) Creates a duplicate repository without tracking changes
6. What is NOT an advantage of using Git?
o A) Facilitates collaboration among developers
o B) Maintains a detailed history of changes
o C) Cannot function without an active internet connection
o D) Allows branching and merging for development
7. What command stages all the changes in your working directory?
o A) git commit
o B) git add .
o C) git stage
o D) git merge
8. What happens when you run git commit -m "Initial Commit"?
o A) Changes are directly uploaded to GitHub
o B) Changes are stored in the local repository
o C) Changes are staged but not committed
o D) Changes are merged into the default branch
---------------------Module 1 ended-----------------------
Module 2: Branching, Merging, and Undoing Changes
9. What is the purpose of branching in Git?
o A) To remove unwanted code permanently
o B) To experiment with new features without altering the main branch
o C) To create backups of files
o D) To directly merge changes without review
10. What command creates a new branch in Git?
o A) git checkout
o B) git branch <branch-name>
o C) git create-branch
o D) git switch
11. What does git merge <branch-name> do?
o A) Deletes a branch permanently
o B) Integrates changes from the specified branch into the current branch
o C) Rolls back the last commit
o D) Creates a backup of the repository
12. What is a merge conflict?
o A) When two branches modify the same section of code and Git cannot
automatically resolve the changes
o B) When a merge fails due to incorrect commands
o C) When a developer tries to merge an untracked branch
o D) When two developers commit different changes at the same time
13. What command is used to undo changes in Git?
o A) git reset
o B) git remove
o C) git undo
o D) git revert
14. What is a "working directory" in Git?
o A) A cloud-based repository on GitHub
o B) A directory where changes are staged before committing
o C) A local directory where files are modified before tracking
o D) A temporary backup space
15. Which command shows the differences between two commits?
o A) git diff
o B) git log --compare
o C) git status --diff
o D) git show
16. What happens if you run git checkout <branch-name>?
o A) You switch to the specified branch
o B) You create a new branch
o C) You delete the branch permanently
o D) You merge the branch into the main branch
--------------------Module 2 ended----------------------
Module 3: GitHub Collaboration
17. What is the main purpose of GitHub?
o A) To execute Git commands on a cloud server
o B) To host Git repositories and provide collaborative tools
o C) To replace Git entirely
o D) To store large media files and databases
18. How do you push local commits to GitHub?
o A) git push
o B) git upload
o C) git commit
o D) git send
19. What is a pull request?
o A) A request to retrieve changes from a remote repository
o B) A request to merge one branch into another after review
o C) A request to delete a repository from GitHub
o D) A request to create a new repository
20. What command do you use to clone a GitHub repository?
o A) git fetch-repo
o B) git clone
o C) git sync
o D) git pull
21. What is forking in GitHub?
o A) Creating a personal copy of another user’s repository for independent
work
o B) Merging multiple repositories into one
o C) Restoring a deleted repository
o D) Resetting all branches to their initial state
22. How do you link a local repository to a remote one?
o A) git remote add origin <url>
o B) git connect <url>
o C) git sync <url>
o D) git attach <url>
23. What is the difference between git pull and git fetch?
o A) git pull downloads and merges changes, while git fetch only downloads
them
o B) git fetch updates branches, while git pull creates new branches
o C) git pull only works for forks
o D) Both commands are identical
24. What happens when you merge a pull request on GitHub?
o A) Changes are incorporated into the target branch
o B) The repository is reset to a previous state
o C) A new branch is automatically created
o D) The repository is deleted
------------------Module 3 ended----------------
Module 4: Advanced GitHub Features
25. What is the purpose of a README.md file?
o A) To document project information and usage
o B) To store database records
o C) To execute Git commands
o D) To delete repositories
26. What can be done using GitHub Actions?
o A) Automate development workflows
o B) Permanently delete repositories
o C) Rename repository owners
o D) Manually merge conflicts

27. How do you link an existing local Git repository to a new GitHub repository?

o git remote add origin <url> followed by git push -u origin main
o git connect <url> followed by git sync
o git upload <url> followed by git merge origin
o git set-remote <url> followed by git push origin

28. What is an issue in GitHub?


o A) A way to track and discuss bugs, feature requests, and enhancements
o B) A command to fix errors in Git
o C) A method to permanently delete commits
o D) A repository for tracking changes
29. What is GitHub Pages used for?
 A) Hosting static websites directly from a GitHub repository
 B) Managing repository permissions and access control
 C) Automatically resolving merge conflicts
 D) Encrypting GitHub repositories for security
30. What is the purpose of GitHub Discussions?
 A) To track issues and pull requests
 B) To provide a space for community engagement and Q&A within a
repository
 C) To merge branches collaboratively
 D) To remove inactive contributors from a project
31. What is a GitHub webhook?
 A) A method to trigger automated actions based on repository events
 B) A command that fetches changes from a remote repository
 C) A built-in security feature to prevent unauthorized access
 D) A tool for manually reviewing and merging pull requests

32. What happens when a repository is archived on GitHub?


 A) It is permanently deleted and cannot be restored
 B) It becomes read-only, preventing new commits and issues
 C) It automatically merges all open pull requests before archiving
 D) It locks all branches except the main branch

------------------Module 4 ended------------------

You might also like