NEW
Font size
WorksheetsPatchfest Quiz
Total questions: 50
Worksheet time: 25mins
Which command initializes a new Git repository?
git start
git init
git create
git new
Which command stages files for a commit?
git stage
git commit
git add
git push
How do you check the state of your working directory and staging area?
git log
git diff
git status
git check
What flag is used to provide a commit message directly in the command line?
-c
-t
-m
-msg
Which command downloads a repository from a remote source to your local machine?
git pull
git copy
git clone
git fork
Which command lists the commit history?
git history
git log
git past
git list
How do you create a new branch called "feature"?
git checkout feature
git branch feature
git new feature
git add branch feature
Which command switches to an existing branch named "dev"?
git move dev
git branch dev
git checkout dev
git enter dev
What does "git pull" do?
It only fetches changes.
It only merges changes.
It fetches changes and immediately merges them.
It uploads your changes to the remote.
Which command uploads your local commits to a remote repository?
git send
git update
git push
git upload
What is the purpose of the .gitignore file?
To list files Git should delete.
To list files Git should ignore and not track.
To store password credentials.
To list ignored commit messages.
Which command combines changes from one branch into the current branch?
git join
git combine
git merge
git mix
What is a "merge conflict"?
When two branches have the same name.
When Git cannot automatically resolve differences between two commits.
When you lose your internet connection during a push.
When a file is too large to merge.
Which command saves your changes temporarily without committing them?
git save
git hold
git stash
git pause
How do you discard changes in the working directory for a specific file?
git delete filename
git remove filename
git checkout -- filename
git drop filename
What does "git remote -v" do?
Verifies the repository.
Shows the URLs of the remote repositories.
Validates the last commit.
Views the remote file content.
Which command shows the difference between the working directory and the staging area?
git status
git diff
git show
git compare
What is "HEAD" in Git?
The first commit of the repo.
A pointer to the latest commit of the currently checked-out branch.
The master branch.
The remote server.
How do you rename the current branch to "main"?
git rename main
git branch -m main
git mv main
git checkout -b main
Which command is used to unstage a file?
git delete
git remove
git reset
git undo
What is the difference between "git fetch" and "git pull"?
There is no difference.
fetch downloads changes but doesn't merge; pull downloads and merges.
pull is for local, fetch is for remote.
fetch deletes files, pull adds them.
What does "git rebase" do?
It deletes the database.
It merges two branches creating a merge commit.
It moves or combines a sequence of commits to a new base commit.
It restores the base code to the initial state.
Which file stores the user's Git configuration (name, email)?
.gitinfo
.gitconfig
config.git
.usergit
How do you view the changes introduced by a specific commit?
git see [commit-hash]
git show [commit-hash]
git view [commit-hash]
git look [commit-hash]
What does "git blame filename" do?
Deletes the file and blames the user.
Shows which commit and author modified each line of the file.
Finds bugs in the file.
Checks the file permissions.
What is a "Fork" on GitHub?
A new branch in the same repository.
A personal copy of someone else's repository.
A tool to eat code.
A merge conflict resolution.
What is a "Pull Request" (PR)?
A request to download code to your local machine.
A request to merge your changes into another branch or repository.
A request to pull data from an API.
A request to delete a repository.
What is "GitHub Pages"?
The documentation for GitHub.
A hosting service for static websites directly from a GitHub repo.
A social media feed for developers.
A paid feature for enterprise users.
What file is commonly used to describe a project on GitHub?
INDEX.html
HELP.txt
README.md
INTRO.doc
What is the "upstream" remote usually referring to?
Your local repository.
The original repository you forked from.
Your forked repository on GitHub.
The cloud server.
What allows you to automate workflows (CI/CD) directly in GitHub?
GitHub Bots
GitHub Actions
GitHub Flow
GitHub CI
How do you reference an Issue #12 in a commit message to automatically close it?
ref #12
looking at #12
fixes #12
update #12
What is a "Gist"?
A full repository.
A simple way to share code snippets or single files.
A comment on an issue.
A type of branch.
Who can approve a Pull Request?
Only the owner.
Repository collaborators/maintainers with write access.
Anyone on the internet.
The person who opened the PR.
What is the "Issues" tab used for?
Only for reporting bugs.
Only for feature requests.
Tracking bugs, enhancements, and other project tasks.
Chatting with friends.
What does "Watching" a repository do?
It puts a camera icon on your profile.
It notifies you of all activity in that repository.
It simply bookmarks the repository.
It automatically forks the repository.
What is the .github directory used for?
Storing the source code.
Storing configuration files for GitHub-specific features.
Hiding secret files.
It is a system folder you cannot touch.
What does FOSS stand for?
Free Online Source Software
Free and Open Source Software
Fully Open Source System
File Organization Source Standard
Which license is considered "permissive" (allows proprietary use)?
GPL v3
AGPL
MIT
Copyleft
What is "Copyleft"?
A copyright violation.
A practice where derivative works must be distributed under the same license terms.
Leaving a project.
Removing copyright from a file.
What is a CLA (Contributor License Agreement)?
A fee paid to contribute.
A legal document stating you have the right to contribute the code.
A tutorial on how to code.
A coding style guide.
What should you usually do before starting work on a major feature in an Open Source project?
Just write the code and push it.
Email the CEO of GitHub.
Open an issue or discussion to propose the idea to maintainers.
Fork the repo and keep it private.
What is "semantic versioning" (SemVer) format?
Year.Month.Day
Major.Minor.Patch
Alpha.Beta.Live
v1, v2, v3
What does it mean if a project is "archived" on GitHub?
It is deleted.
It is read-only and no longer actively maintained.
It is hidden from the public.
It is a premium project.
What is the standard file to explain how to contribute to a project?
README.md
CONTRIBUTING.md
HELP.md
RULES.txt
In FOSS, what is a "Maintainer"?
The person who pays for the server.
A person responsible for managing the project, reviewing PRs, and merging code.
A bot that cleans up code.
A user who only reports bugs.
Which command applies the changes from a specific commit on one branch onto your current branch?
git merge
git rebase
git cherry-pick
git apply
What is the purpose of "Branch Protection Rules" on GitHub?
To prevent anyone from viewing the branch.
To prevent force pushes and require PR reviews before merging.
To automatically delete the branch after 30 days.
To encrypt the code in the branch.
Which Git command uses binary search to find the specific commit that introduced a bug?
git search
git find
git debug
git bisect
What is the purpose of a CODE_OF_CONDUCT.md file in an open source project?
To explain how to compile the code.
To define acceptable community behavior and reporting procedures for harassment.
To list the coding style guidelines (indentation, variable naming)
To list the authors of the software.
