AlgoMaster Logo

GitHub Essentials - Quiz

Last Updated: January 3, 2026

GitHub Essentials Exercises

30 quizzes

1
Code Completion

Upload your local commits for the main branch to the remote repository named origin for review via a pull request

shell
1
git origin main

Click an option to fill the blank:

2
Code Completion

Create a new local Git repository for your project before pushing it to GitHub

shell
1
git

Click an option to fill the blank:

3
Code Completion

Stage all modified and new files so they are included in the next commit you will push to GitHub

shell
1
git .

Click an option to fill the blank:

4
Code Completion

Set the URL for the origin remote to use SSH when interacting with GitHub

shell
1
git remote origin git@github.com:username/repo.git

Click an option to fill the blank:

5
Code Completion

Create a new branch locally to develop a feature that you will later publish to GitHub via a pull request

shell
1
git -b feature/login-form

Click an option to fill the blank:

6
Multiple Choice

Which statement best describes GitHub compared to Git?

7
Multiple Choice

When creating a new GitHub repository for an open-source project, which visibility should you choose?

8
Multiple Choice

Why does GitHub recommend using a Personal Access Token (PAT) with HTTPS instead of a password?

9
Multiple Choice

What is the main purpose of a GitHub Pull Request?

10
Multiple Choice

Which GitHub feature is best suited for tracking bugs, feature requests, and tasks?

11
Sequencing

Order the steps to create a new repository on GitHub via the UI and push an existing local project to it over HTTPS.

Drag and drop to reorder, or use the arrows.

12
Sequencing

Order the steps to generate an SSH key and connect it to GitHub for authenticating Git operations.

Drag and drop to reorder, or use the arrows.

13
Sequencing

Order the steps to create a pull request for a completed feature branch on GitHub.

Drag and drop to reorder, or use the arrows.

14
Sequencing

Order the steps to publish a static site with GitHub Pages from an existing repository.

Drag and drop to reorder, or use the arrows.

15
Output Prediction

You are on branch feature/docs and want to confirm the current branch before opening a pull request. What will this command output?

1git branch --show-current
16
Output Prediction

You have just created a tag v1.0.0 for a release. What will this command output?

1git describe --tags --exact-match
17
Output Prediction

You are on branch main and have just run git commit -m "Add CI workflow". What will this command output?

1git log -1 --pretty=%s
18
Output Prediction

In a repository with remote origin set to git@github.com:username/project.git, what does this command print?

1git remote get-url origin
19
Bug Spotting

Find the incorrect command in this workflow for cloning a GitHub repo over HTTPS and pushing a change.

Click on the line(s) that contain the bug.

shell
1
git clone git@github.com:username/website.git
2
cd website
3
git checkout -b fix-link
4
echo "Updated" >> README.md
5
git add README.md
6
git commit -m "Fix link in README"
7
git push https://github.com/username/website.git fix-link
20
Bug Spotting

Find the incorrect command in this workflow for preparing a GitHub release tag.

Click on the line(s) that contain the bug.

shell
1
git checkout main
2
git pull origin main
3
git tag v2.0.0 -m "Release 2.0.0"
4
git push origin main
5
git push origin --tags
21
Bug Spotting

Find the incorrect command in this workflow for creating a GitHub Actions CI workflow file.

Click on the line(s) that contain the bug.

shell
1
git checkout -b ci-setup
2
mkdir -p .github/workflows
3
echo "name: CI" > .github/workflows/ci.yml
4
git add .github/workflows/ci.yml
5
git commit CI workflow added
6
git push origin ci-setup
22
Matching

Match each GitHub feature with its primary purpose.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

23
Matching

Match each GitHub Issues element with its role in task tracking.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

24
Matching

Match each Git command with how it relates to GitHub remotes.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

25
Fill in the Blanks

Complete the commands to clone a repo over SSH and push a new branch to GitHub.

shell
1
git clone {{1 }}
2
cd repo-name
3
git checkout -b {{2 }}
4
git push -u {{3 }} {{4 }}

Click an option to fill blank 1:

26
Fill in the Blanks

Complete the commands to configure Git to use your GitHub email for commits and view the current configuration.

shell
1
git config --global user.email {{1 }}
2
git config --global {{2 }}

Click an option to fill blank 1:

27
Fill in the Blanks

Complete the commands to create and push an annotated tag for a GitHub release.

shell
1
git tag -a {{1 }} -m {{2 }}
2
git push {{3 }} {{4 }}

Click an option to fill blank 1:

28
Hotspot Selection

Click the line that indicates the current branch before opening a pull request.

Click on the line to select.

shell
1
  main
2
* feature/payment-flow
3
  bugfix/header-alignment
29
Hotspot Selection

Click the line that shows the GitHub remote URL using SSH.

Click on the line to select.

shell
1
origin	git@github.com:username/app.git (fetch)
2
origin	git@github.com:username/app.git (push)
30
Hotspot Selection

Click the workflow job name line in this GitHub Actions log snippet.

Click on the line to select.

shell
1
Run actions/checkout@v4
2
Run npm install
3
Job name: build-and-test
4
Run npm test