GitHub Quiz: Test Your GitHub Knowledge
Pick how many questions you want, choose a difficulty and go. You'll see why each answer is right or wrong, then you can retry to beat your score.
What does pushing do?
- Downloads commits from GitHub
- Deletes a branch
- Sends your local commits to the remote repository
- Creates a new repository
Why should your Git email match your GitHub email?
- Git won't work otherwise
- To receive notifications
- To make the repository public
- So GitHub links your commits to your profile
What is a profile README?
- A README in a repo named after your username, shown on your profile
- A README in every repository
- Your account settings page
- A private note
Which of these can Git use to authenticate with GitHub?
- Your GitHub account password
- A browser sign-in through GitHub CLI or Git Credential Manager
- Your email address alone
- Your username alone
Why turn on two-factor authentication?
- A stolen password alone isn't enough to get into your account
- It makes pushes faster
- It's needed to create a README
- It makes repositories private
What is the file name of a repository's front page?
- index.txt
- HOME.md
- README.md
- about.html
What format are README.md files written in?
- HTML
- Markdown
- JSON
- Plain text only
You'll push an existing project. Which starter files should you tick when creating the repository?
- All of them
- Only README
- None of them
- Only the licence
Which keyboard shortcut opens GitHub's browser-based editor on a repository page?
- E
- Ctrl + E
- /
- . (full stop)
What does a licence file tell people?
- How to install the project
- Who wrote each line
- What they're allowed to do with the code
- Which branch to use
What file name does GitHub show on a repository's front page?
- README.md
- index.html
- home.md
- about.txt
How do you make an image in Markdown?
- image
- <image path.png>
- #image path.png
- !description
What happens when you write
@samleein a comment?- Nothing
- Sam gets a notification and the name links to their profile
- Sam is added as a collaborator
- The comment is sent by email only
Why should screenshots in a README have alt text?
- It makes the image load faster
- Screen readers read it aloud, and it shows if the image fails to load
- GitHub requires it to publish
- It changes the image size
Your bullet list appears glued to the previous paragraph. What's the most likely fix?
- Add an empty line before the list
- Use * instead of -
- Put each item in quotes
- Indent the whole list by eight spaces
Where does a profile README appear?
- In every repository
- In your email signature
- On GitHub's home page for everyone
- At the top of your GitHub profile page
What are repository topics for?
- Sorting commits
- Creating branches
- Labelling a repository so people can find it by subject or technology
- Setting permissions
Which counts as a contribution on the graph?
- Viewing a repository
- Starring a repository
- Logging in
- Commits to the default branch, pull requests, issues and reviews
What should a short profile README include?
- Every repository you've ever made
- Who you are, what you build or learn, highlights and how to contact you
- Your password hints
- Only badges
Why pin finished projects rather than your newest ones?
- GitHub requires it
- New repositories can't be pinned
- Visitors judge you by what they see first, so it should be your best, most complete work
- Pins expire
Why does
git pushreject your GitHub account password?- The password is too short
- GitHub no longer accepts account passwords for Git operations
- Git doesn't support passwords at all
- Only private repositories need passwords
What is a personal access token?
- An SSH key
- A type of commit
- A GitHub badge
- A generated secret used instead of a password, with limited permissions and an expiry
What does an SSH key passphrase protect against?
- Someone using your private key if they copy the file
- Slow pushes
- Merge conflicts
- Losing commits
What does two-factor authentication add?
- A second GitHub account
- A second proof of identity, such as an app code or security key, in addition to the password
- A backup of your repositories
- Faster sign-in
Your private key may have leaked. What should you do first?
- Rename the file
- Change your profile picture
- Delete that key in GitHub's SSH settings and create a new key pair
- Nothing, keys can't be misused
What is
origin?- The default name for the remote repository you cloned from or added
- The first commit
- The main branch
- A GitHub username
Which command lists your remotes and their URLs?
- git remote list
- git origin
- git show remote
- git remote -v
What does the
-uingit push -u origin maindo?- Updates every branch
- Undoes the last push
- Remembers origin/main as the upstream, so later you can just run git push
- Uploads only unstaged changes
Why should you avoid
git push --forceon a shared branch?- It's slower
- It can overwrite and delete commits other people pushed
- GitHub doesn't allow it
- It deletes your local branch
What does
-udo ingit push -u origin main?- Undoes the last push
- Updates every branch
- Uploads untracked files
- Sets origin/main as the upstream, so later you can just run git push
What does typing
@samin an issue do?- Assigns the issue to sam
- Closes the issue
- Mentions sam and sends them a notification
- Creates a label
What are milestones used for?
- Deleting old issues
- Counting commits
- Making issues private
- Grouping issues into a goal or release with a progress bar
What does
#15in an issue comment become?- A link to issue or pull request number 15
- A heading
- A comment that's hidden
- A label
Where can a closing keyword such as
Fixes #23go so the issue closes automatically?- Only in the issue itself
- In a pull request description or a commit message that reaches the default branch
- Only in the README
- In a branch name
What makes a useful bug report?
- Just "it doesn't work"
- A screenshot of the home page only
- Steps to reproduce, what you expected and what actually happened
- The word urgent in capitals
How do you contribute to a repository you can't push to?
- Fork it, push a branch to your fork, then open a PR
- You can't
- Ask GitHub support
- Clone it and push to main
What does "Squash and merge" do?
- Deletes the PR's commits
- Merges without review
- Combines all the PR's commits into a single commit on the target branch
- Merges several PRs at once
Where do reviewers leave comments on specific lines?
- In the README
- In the commit message
- On the Files changed tab of the pull request
- In an issue
Why are small pull requests better?
- GitHub limits PR size
- They're quicker and easier to review well, and easier to undo
- They merge faster technically
- They don't need descriptions
What does "Squash and merge" do?
- Deletes the pull request
- Merges without review
- Rebases main onto the branch
- Combines all the PR's commits into one commit on the target branch
What should you read before reviewing the code itself?
- The commit hashes
- The repository's licence
- The author's profile
- The pull request's description
Why use "Start a review" instead of single comments?
- It's required
- It hides your comments from the author
- It sends all your comments together with one verdict, instead of a notification per comment
- It approves automatically
What does "nit:" usually mean at the start of a comment?
- This is a serious bug
- Not in this PR
- Needs immediate testing
- A small, optional point
The author has fixed your requested changes. How do they ask you to look again?
- Click re-request review next to your name
- Open a new pull request
- Close and reopen the PR
- Delete your comments
Which comment is the most helpful?
- "Bad code."
- "This runs a database query inside the loop, so 100 items means 100 queries. Could we load them all at once before the loop?"
- "Why?"
- "Rewrite this."
Why do you need a fork to contribute to most open-source projects?
- Forks are faster
- GitHub requires a fork for every PR
- Forks are private
- You don't have permission to push to the original repository
What does the Sync fork button do?
- Deletes your fork
- Updates your fork on GitHub with the original project's new commits
- Merges your PR
- Creates a new branch
Which file usually explains how a project wants contributions made?
- LICENSE
- .gitignore
- CONTRIBUTING.md
- package.json
Which label often marks issues suitable for newcomers?
- good first issue
- wontfix
- duplicate
- invalid
Why keep your fork's main identical to upstream's main?
- GitHub deletes forks that differ
- Pull requests only work from main
- Syncing stays a simple fast-forward, and new branches start from the project's latest code
- It makes the fork private
Which file explains how to contribute to a project?
- CONTRIBUTING.md
- LICENSE
- .gitignore
- package.json
Where do you mark a repository as a template?
- In the README
- In .github/config.yml
- With a topic
- In the repository's Settings, General section
What does the Community standards page show?
- Commit statistics
- Code style errors
- A checklist of recommended community files and whether the project has them
- Open pull requests
Why are HTML comments useful in templates?
- They're required
- They show hints while writing but are hidden in the posted text
- They make text bold
- They add labels
Why keep templates short?
- GitHub limits them to 5 lines
- Short templates load faster
- Markdown can't handle long files
- Long templates tend to be ignored or deleted, so ask only what you'll actually use
What can a GitHub project contain?
- Issues, pull requests and draft items, from one or more repositories
- Only commits
- Only issues from a single repository
- Only files
What is a draft item?
- A closed issue
- An unpublished release
- A draft pull request
- A quick note in a project that can later be converted into a real issue
Which view is best for planning dates on a timeline?
- Board
- Roadmap
- Table
- Discussions
What advantage do issue forms have over a blank issue?
- They're private
- They close automatically
- Required fields and menus make every report include the information you need
- They skip review
What does an Iteration field help a team do?
- Plan work in fixed time periods such as two-week sprints
- Count commits
- Merge pull requests
- Sync forks
What is a gist?
- A type of branch
- A pull request comment
- A GitHub Action
- A shareable snippet or small set of files with its own history
How do you clone a repository's wiki?
- git clone the repository URL with .wiki.git on the end
- git clone <repo>/wiki
- gh wiki clone
- Wikis can't be cloned
How do you link to a wiki page titled Installation?
- {{Installation}}
- <Installation>
- [[Installation]]
- #Installation
Can a public gist be made secret later?
- Yes, any time
- Only by GitHub support
- Only within an hour
- No, but a secret gist can be made public
What's one drawback of wikis compared with a docs folder?
- Wikis can't use Markdown
- Wiki edits aren't reviewed in pull requests or tied to code versions
- Wikis are always private
- Wikis can't have links
Where do you turn on GitHub Pages?
- In the Issues tab
- In your profile README
- In the terminal only
- In the repository's Settings, under Pages
Why should you use relative paths like
css/style.css?- They load faster
- They work both on your computer and on the published site
- GitHub requires short file names
- They hide your files
What does naming a repository
username.github.iodo?- Publishes it as your main site at https://username.github.io/
- Makes it private
- Deletes your other sites
- Creates a custom domain
Your site works locally, but on GitHub Pages one image is missing. What's the most likely cause?
- GitHub Pages doesn't support images
- The image is too old
- The capital letters in the file name don't match the HTML
- You need a custom domain
What kind of website can GitHub Pages host?
- Sites that need a PHP server
- Static sites made of HTML, CSS, JavaScript and images
- Sites with their own database
- Only Markdown files
What is continuous integration?
- Merging every branch at once
- Automatically building and testing code every time changes are pushed
- Working without branches
- Writing code in the browser
What does
runs-on: ubuntu-latestchoose?- The language version
- The branch to deploy
- The type of machine (runner) the job runs on
- The workflow name
Which trigger adds a "Run workflow" button?
- workflow_dispatch
- push
- schedule
- release
How can you stop a pull request merging while its tests fail?
- Delete the workflow
- Add a label
- Use a matrix
- Make the workflow's check required in branch protection rules
A workflow fails with "npm: package.json not found". What's the likely cause?
- The runner is too slow
- Node.js doesn't run on Ubuntu
- The workflow didn't run actions/checkout, so the repository isn't on the runner
- Secrets are missing
What does every GitHub release point to?
- A Git tag marking one commit
- A branch
- An issue
- A fork
Which change should increase the MINOR number?
- A bug fix
- A new feature that doesn't break existing use
- A breaking change
- A typo in the README
What does GitHub add to every release automatically?
- Source code archives in zip and tar.gz formats
- An installer
- A changelog file
- A new branch
Who should release notes mainly be written for?
- The CI system
- The people using the project
- Only the maintainers
- Search engines
v1.2.0 was published with a bug. What's the right fix?
- Delete v1.2.0 and recreate it on a new commit
- Rename the release
- Force push main
- Fix the bug and publish v1.2.1
How many owners should an organization have at least?
- Two
- One
- Ten
- Every member
How do you notify a whole team on a pull request?
- Email each person
- Mention it, such as @acme/frontend, or request its review
- Add a label
- Star the repository
What does a nested team inherit?
- The parent team's repository access
- Nothing
- The organization's billing
- Its parent's members
What should the organization's base permission usually be?
- Admin
- Write
- Owner
- The lowest that works, such as Read or None
Someone leaves the company. Besides removing them from the organization, what should you check?
- Their profile picture
- Automation using their personal tokens or keys, which should be replaced
- Their stars
- Their public gists
What does Dependabot watch?
- Your commit messages
- Your project's dependencies, for vulnerabilities and new versions
- Your GitHub profile
- Other people's forks
What is the principle of least privilege?
- Everyone gets admin access
- Give each person only the access they need
- Nobody can push to main
- Only one person can use the repository
What does code scanning with CodeQL look for?
- Spelling mistakes in comments
- Large images
- Unused branches
- Common security vulnerability patterns in your code
Why doesn't deleting a committed secret in a new commit make it safe?
- The secret is still in the repository's history and may already have been copied
- Git refuses to delete files
- GitHub restores deleted files
- New commits are private
How do Dependabot pull requests stay safe to merge?
- They skip tests
- GitHub merges them automatically without checks
- They're ordinary pull requests, so your CI tests and reviews run on them before merging
- They only change the README
Which key opens github.dev on a repository page?
- /
- . (full stop)
- g
- Ctrl + G
What can github.dev not do?
- Edit files
- Commit changes
- Open pull requests
- Run code or open a terminal
Are forwarded ports public by default?
- Yes
- Only port 80
- No, they're private to you unless you change them
- Only in organizations
How are Codespaces mostly billed?
- By compute time while running, plus storage
- Per commit
- Per repository
- They're always unlimited
Why commit a devcontainer.json to the repository?
- It's required for Git
- It makes the repository private
- Every codespace and teammate gets the same tools, versions and extensions automatically
- It replaces package.json
What is
gh?- A newer version of Git
- GitHub's official command-line tool for working with GitHub
- A Git alias
- A text editor
What does
gh repo create name --source=. --pushdo?- Clones a repository
- Deletes the remote
- Creates a fork
- Creates a GitHub repository from the current folder, adds the remote and pushes
What does
gh browsedo inside a repository?- Opens the repository on GitHub in your web browser
- Lists files
- Searches all of GitHub
- Downloads a release
Why use
--jsonwith gh commands?- It makes output colourful
- It's required for all commands
- It speeds up pushes
- It gives structured output that scripts can read and filter
Why avoid
gh pr merge --adminin normal work?- It deletes the repository
- It bypasses branch protection, skipping required reviews and checks
- It only works on forks
- It doesn't merge anything
Which CODEOWNERS version routes a pull request's owner review requests?
- Always the version from the contributor's laptop
- The newest file found in any fork
- The version on the pull request's base branch
What turns code-owner approval into a merge requirement?
- An applicable repository review rule
- Only adding a wildcard owner line
- Renaming the file to lowercase
Which Actions event is needed to evaluate a merge queue candidate?
- merge_group with checks_requested
- Only issue_comment
- Only a manually named branch called queue
What should a real queue-required check evaluate?
- Only a hard-coded old main revision
- The candidate combining target and queued changes
- Only the pull request title
What connects report to choose's declared output in the workflow?
- Giving both jobs the same runner
- needs: choose and the needs context
- Printing ready in a log
How should a user-controlled message enter the Bash printing step?
- By constructing the shell source from its text
- By disabling every quote in the command
- Through an environment variable used in a quoted fixed command
Which trigger declares a workflow callable through another workflow's job?
- issue_comment alone
- A comment named reusable
- workflow_call
Which property of a called workflow's token permissions is essential?
- They cannot elevate beyond the caller's allowed permissions
- They always gain repository administration
- They are determined only by the workflow filename
Which storage is intended for the report produced by a particular run?
- A named workflow artifact
- An arbitrary dependency cache hit
- The runner's temporary memory after the job ends
What should you avoid placing in a dependency cache?
- Recreatable public package download data
- Credentials or private signing material
- A documented compatible tool cache
What is the key risk of executing a fork's head in a privileged pull_request_target job?
- The branch automatically becomes private
- Untrusted code can run with the job's trusted-context access
- The workflow loses all ability to read metadata
Which review best describes a workflow's trust boundary?
- Read only the workflow display name
- Assume every green check used trusted code
- Trace code sources, credentials, permissions and downstream files
Which statement correctly describes decoding an OIDC JWT?
- It grants every cloud permission immediately
- It replaces the provider's trust policy
- It reveals claims but does not establish signature validity
What should a provider trust policy restrict besides the issuer?
- The intended audience and eligible job identity conditions
- Only the workflow's friendly display name
- Only the time the developer opened the editor
Which signal does this collector use to continue traversal?
- The Link header's next relation
- The last issue title
- The repository's display color
Why validate the next-link origin before an authenticated request?
- To ensure every repository has exactly two pages
- To avoid sending credentials to an unexpected destination
- To grant the client write access
Where does the example issue form belong?
- Only inside .git/config
- .github/ISSUE_TEMPLATE/bug.yml
- Inside an arbitrary source-code comment
What should a focused needs-information response do?
- Demand every possible environment detail regardless of relevance
- Treat the report as a confirmed release blocker
- Ask for the specific missing detail needed for the next decision
Which job capability does the example request for GHCR publishing?
- Only issues: read
- Repository administration by default
- packages: write
What does the source label alone establish?
- Declared source metadata, which still needs provenance review
- Cryptographic proof of every build input
- Automatic public access to the package
About the GitHub quiz
This GitHub quiz covers every lesson in the course, from creating a repository and writing a README to pull requests, Actions workflows, releases and security settings. Many questions describe a real situation, such as a push rejected with "Authentication failed", a fork that has fallen behind or a workflow that can't find package.json, and ask what to do next. Others check the vocabulary you'll meet in documentation and job descriptions, such as upstream, status check, pre-release and least privilege.
If you're still in the beginner stage, choose Easy and a topic like repositories or Markdown. After the intermediate lessons, try Mixed with 10 questions to practise issues, pull requests, reviews and forks together. Use Exam mode once you've finished the advanced stage; it hides answers until the end, so you get an honest picture of what you remember.
When you miss a question, read the explanation and revisit the lesson linked in your results. Pay attention to places where Git and GitHub meet, such as the difference between a fork and a clone, origin and upstream, or a tag and a release. Those pairs cause most of the confusion beginners run into, and sorting them out here makes real projects far smoother.
The question bank holds 120 questions drawn from 30 GitHub lessons: 20 easy, 80 medium and 20 hard. Every time you start, the quiz picks a fresh random selection that matches your settings, so retaking it is a good way to practise. After each answer, or at the end in exam mode, you'll see why the right answer is right, and every question you miss links back to the lesson that teaches it.