wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Patchfest Quiz

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

Which command initializes a new Git repository?

a)

git start

b)

git init

c)

git create

d)

git new

2.

Which command stages files for a commit?

a)

git stage

b)

git commit

c)

git add

d)

git push

3.

How do you check the state of your working directory and staging area?

a)

git log

b)

git diff

c)

git status

d)

git check

4.

What flag is used to provide a commit message directly in the command line?

a)

-c

b)

-t

c)

-m

d)

-msg

5.

Which command downloads a repository from a remote source to your local machine?

a)

git pull

b)

git copy

c)

git clone

d)

git fork

6.

Which command lists the commit history?

a)

git history

b)

git log

c)

git past

d)

git list

7.

How do you create a new branch called "feature"?

a)

git checkout feature

b)

git branch feature

c)

git new feature

d)

git add branch feature

8.

Which command switches to an existing branch named "dev"?

a)

git move dev

b)

git branch dev

c)

git checkout dev

d)

git enter dev

9.

What does "git pull" do?

a)

It only fetches changes.

b)

It only merges changes.

c)

It fetches changes and immediately merges them.

d)

It uploads your changes to the remote.

10.

Which command uploads your local commits to a remote repository?

a)

git send

b)

git update

c)

git push

d)

git upload

11.

What is the purpose of the .gitignore file?

a)

To list files Git should delete.

b)

To list files Git should ignore and not track.

c)

To store password credentials.

d)

To list ignored commit messages.

12.

Which command combines changes from one branch into the current branch?

a)

git join

b)

git combine

c)

git merge

d)

git mix

13.

What is a "merge conflict"?

a)

When two branches have the same name.

b)

When Git cannot automatically resolve differences between two commits.

c)

When you lose your internet connection during a push.

d)

When a file is too large to merge.

14.

Which command saves your changes temporarily without committing them?

a)

git save

b)

git hold

c)

git stash

d)

git pause

15.

How do you discard changes in the working directory for a specific file?

a)

git delete filename

b)

git remove filename

c)

git checkout -- filename

d)

git drop filename

16.

What does "git remote -v" do?

a)

Verifies the repository.

b)

Shows the URLs of the remote repositories.

c)

Validates the last commit.

d)

Views the remote file content.

17.

Which command shows the difference between the working directory and the staging area?

a)

git status

b)

git diff

c)

git show

d)

git compare

18.

What is "HEAD" in Git?

a)

The first commit of the repo.

b)

A pointer to the latest commit of the currently checked-out branch.

c)

The master branch.

d)

The remote server.

19.

How do you rename the current branch to "main"?

a)

git rename main

b)

git branch -m main

c)

git mv main

d)

git checkout -b main

20.

Which command is used to unstage a file?

a)

git delete

b)

git remove

c)

git reset

d)

git undo

21.

What is the difference between "git fetch" and "git pull"?

a)

There is no difference.

b)

fetch downloads changes but doesn't merge; pull downloads and merges.

c)

pull is for local, fetch is for remote.

d)

fetch deletes files, pull adds them.

22.

What does "git rebase" do?

a)

It deletes the database.

b)

It merges two branches creating a merge commit.

c)

It moves or combines a sequence of commits to a new base commit.

d)

It restores the base code to the initial state.

23.

Which file stores the user's Git configuration (name, email)?

a)

.gitinfo

b)

.gitconfig

c)

config.git

d)

.usergit

24.

How do you view the changes introduced by a specific commit?

a)

git see [commit-hash]

b)

git show [commit-hash]

c)

git view [commit-hash]

d)

git look [commit-hash]

25.

What does "git blame filename" do?

a)

Deletes the file and blames the user.

b)

Shows which commit and author modified each line of the file.

c)

Finds bugs in the file.

d)

Checks the file permissions.

26.

What is a "Fork" on GitHub?

a)

A new branch in the same repository.

b)

A personal copy of someone else's repository.

c)

A tool to eat code.

d)

A merge conflict resolution.

27.

What is a "Pull Request" (PR)?

a)

A request to download code to your local machine.

b)

A request to merge your changes into another branch or repository.

c)

A request to pull data from an API.

d)

A request to delete a repository.

28.

What is "GitHub Pages"?

a)

The documentation for GitHub.

b)

A hosting service for static websites directly from a GitHub repo.

c)

A social media feed for developers.

d)

A paid feature for enterprise users.

29.

What file is commonly used to describe a project on GitHub?

a)

INDEX.html

b)

HELP.txt

c)

README.md

d)

INTRO.doc

30.

What is the "upstream" remote usually referring to?

a)

Your local repository.

b)

The original repository you forked from.

c)

Your forked repository on GitHub.

d)

The cloud server.

31.

What allows you to automate workflows (CI/CD) directly in GitHub?

a)

GitHub Bots

b)

GitHub Actions

c)

GitHub Flow

d)

GitHub CI

32.

How do you reference an Issue #12 in a commit message to automatically close it?

a)

ref #12

b)

looking at #12

c)

fixes #12

d)

update #12

33.

What is a "Gist"?

a)

A full repository.

b)

A simple way to share code snippets or single files.

c)

A comment on an issue.

d)

A type of branch.

34.

Who can approve a Pull Request?

a)

Only the owner.

b)

Repository collaborators/maintainers with write access.

c)

Anyone on the internet.

d)

The person who opened the PR.

35.

What is the "Issues" tab used for?

a)

Only for reporting bugs.

b)

Only for feature requests.

c)

Tracking bugs, enhancements, and other project tasks.

d)

Chatting with friends.

36.

What does "Watching" a repository do?

a)

It puts a camera icon on your profile.

b)

It notifies you of all activity in that repository.

c)

It simply bookmarks the repository.

d)

It automatically forks the repository.

37.

What is the .github directory used for?

a)

Storing the source code.

b)

Storing configuration files for GitHub-specific features.

c)

Hiding secret files.

d)

It is a system folder you cannot touch.

38.

What does FOSS stand for?

a)

Free Online Source Software

b)

Free and Open Source Software

c)

Fully Open Source System

d)

File Organization Source Standard

39.

Which license is considered "permissive" (allows proprietary use)?

a)

GPL v3

b)

AGPL

c)

MIT

d)

Copyleft

40.

What is "Copyleft"?

a)

A copyright violation.

b)

A practice where derivative works must be distributed under the same license terms.

c)

Leaving a project.

d)

Removing copyright from a file.

41.

What is a CLA (Contributor License Agreement)?

a)

A fee paid to contribute.

b)

A legal document stating you have the right to contribute the code.

c)

A tutorial on how to code.

d)

A coding style guide.

42.

What should you usually do before starting work on a major feature in an Open Source project?

a)

Just write the code and push it.

b)

Email the CEO of GitHub.

c)

Open an issue or discussion to propose the idea to maintainers.

d)

Fork the repo and keep it private.

43.

What is "semantic versioning" (SemVer) format?

a)

Year.Month.Day

b)

Major.Minor.Patch

c)

Alpha.Beta.Live

d)

v1, v2, v3

44.

What does it mean if a project is "archived" on GitHub?

a)

It is deleted.

b)

It is read-only and no longer actively maintained.

c)

It is hidden from the public.

d)

It is a premium project.

45.

What is the standard file to explain how to contribute to a project?

a)

README.md

b)

CONTRIBUTING.md

c)

HELP.md

d)

RULES.txt

46.

In FOSS, what is a "Maintainer"?

a)

The person who pays for the server.

b)

A person responsible for managing the project, reviewing PRs, and merging code.

c)

A bot that cleans up code.

d)

A user who only reports bugs.

47.

Which command applies the changes from a specific commit on one branch onto your current branch?

a)

git merge

b)

git rebase

c)

git cherry-pick

d)

git apply

48.

What is the purpose of "Branch Protection Rules" on GitHub?

a)

To prevent anyone from viewing the branch.

b)

To prevent force pushes and require PR reviews before merging.

c)

To automatically delete the branch after 30 days.

d)

To encrypt the code in the branch.

49.

Which Git command uses binary search to find the specific commit that introduced a bug?

a)

git search

b)

git find

c)

git debug

d)

git bisect

50.

What is the purpose of a CODE_OF_CONDUCT.md file in an open source project?

a)

To explain how to compile the code.

b)

To define acceptable community behavior and reporting procedures for harassment.

c)

To list the coding style guidelines (indentation, variable naming)

d)

To list the authors of the software.