GH-900 — GitHub Foundations Cheat Sheet

Cheat sheet: GitHub Foundations (GH-900) reference for Git, repositories, pull requests, collaboration, Actions, security, and GitHub platform basics.

Use the tables for a quick pre-exam check. Expand a topic’s notes for explanations, examples, and additional distinctions.

Scope and study context

The exam is foundational, so expect questions that test whether you understand how GitHub supports software development, collaboration, automation, security, and project workflows. Many questions are not about memorizing commands; they ask you to choose the best GitHub feature, workflow, permission model, or collaboration pattern for a scenario.

This page is IT Mastery exam-prep support. It is not affiliated with GitHub.

After reviewing the concepts above, move into an IT Mastery question bank in three passes:

  1. Topic drills Start with focused drills for Git basics, repositories, pull requests, Actions, security, and project management. The goal is not speed yet; the goal is to expose weak concepts.

  2. Mixed original practice questions Use mixed sets to practice switching between features. GH-900-style questions often test whether you can choose the right GitHub capability from similar-looking options.

  3. Mock exams with detailed explanations Take timed mock exams only after the main topics feel familiar. Review every explanation, including questions you answered correctly, because the explanation often clarifies why similar distractors are wrong.

Exam Focus

This independent Cheat Sheet supports candidates preparing for GitHub Foundations (GH-900), exam code GH-900, from GitHub. Use it to review the platform vocabulary, Git workflows, collaboration features, automation basics, and security/governance decisions that commonly appear in foundation-level GitHub scenarios.

High-yield expectation: be able to choose the right GitHub feature for a collaboration, automation, repository management, or security scenario.

Core Mental Model

ConceptWhat it meansExam cue
GitDistributed version control systemLocal commits, branches, history, merge, rebase
GitHubCloud platform built around Git repositoriesCollaboration, pull requests, issues, Actions, security, organizations
RepositoryProject storage containing files, history, branches, issues, PRs, settings“Where code and project history live”
Working treeYour current local filesFiles edited but not necessarily committed
Staging area / indexPrepared changes for the next commitgit add places changes here
CommitSnapshot of staged changes with metadataLocal history point; not automatically on GitHub
BranchMovable line of developmentIsolate work without changing the default branch
RemoteNamed reference to a hosted repository, often originUsed by fetch, pull, and push
CloneLocal copy of a remote repositoryWork locally with full history
ForkYour own server-side copy of another repositoryContribute without direct write access
Pull requestProposed change set plus review discussionReview, checks, approval, merge
IssueTrack task, bug, enhancement, or discussion itemWork planning, not code review
Notes and examples

High-yield mental model

GitHub is not just “a place to store code.” It combines:

AreaWhat to know for GH-900
Git hostingRepositories, commits, branches, tags, remotes, cloning, pushing, pulling
CollaborationIssues, pull requests, reviews, discussions, forks, branch protection
Project managementLabels, milestones, assignees, projects, task lists, notifications
AutomationGitHub Actions workflows, events, jobs, runners, marketplace actions
SecurityAuthentication, permissions, secret scanning, Dependabot, code scanning
Open sourceREADME, LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY files
Developer experienceGitHub Codespaces, GitHub Copilot, GitHub Pages, GitHub CLI, integrations

A strong GH-900 candidate can explain which GitHub feature solves which problem and how the pieces fit together in a typical development workflow.

Git vs. GitHub: Fast Distinctions

Do not confuseCorrect distinction
Git and GitHubGit is the version control tool; GitHub is a collaboration platform that hosts Git repositories.
Commit and pushCommit records local history; push uploads commits to a remote repository.
Fetch and pullFetch downloads remote updates; pull fetches and integrates them into the current branch.
Branch and forkBranch is a line of work in a repo; fork is a copy of a repo under another account.
Clone and forkClone creates a local copy; fork creates a GitHub-hosted copy.
Pull request and issuePR proposes code changes; issue tracks work, bugs, or ideas.
Release and tagTag marks a Git point; release adds GitHub release notes/assets around a tag.
Watch and starWatch controls notifications; star bookmarks or signals interest.
Project and repositoryRepository stores code/history; Project tracks work items across repos.
Notes and examples

Git vs. GitHub

ConceptGitGitHub
What it isDistributed version control systemCloud platform built around Git repositories
Primary jobTrack file history and changesHost repositories and support collaboration
Works offline?Yes, for local commits and historyMostly online, though local Git work continues offline
Examplescommit, branch, merge, rebase, clonePull requests, issues, Actions, projects, security alerts
Common trapThinking Git requires GitHubGit can be used without GitHub
Another trapThinking GitHub replaces GitGitHub uses Git; it does not replace core Git concepts

Core distinction

  • Git tracks changes.
  • GitHub helps people collaborate around those changes.

If a question asks about version history, commits, branches, and merging, think Git. If it asks about reviews, issues, automation, permissions, or hosted collaboration, think GitHub.

Git Command Quick Sheet

Daily Workflow Commands

TaskCommandNotes
Create a new Git repositorygit initInitializes .git in the current directory.
Copy a remote repository locallygit clone <url>Creates local repo and configures origin.
Check current stategit statusShows branch, staged changes, unstaged changes, untracked files.
View historygit logUse --oneline --graph --decorate for compact history.
See file changesgit diffUnstaged changes by default.
Stage filesgit add <file>Adds selected changes to next commit.
Stage all tracked/untracked changesgit add .Be careful not to stage secrets or generated files.
Commit staged changesgit commit -m "message"Creates local snapshot.
List branchesgit branchShows local branches.
Create branchgit branch <name>Does not switch to it.
Switch branchgit switch <name>Modern command for changing branches.
Create and switch branchgit switch -c <name>Common feature-work command.
Add remotegit remote add origin <url>Links local repo to hosted repo.
View remotesgit remote -vShows fetch/push URLs.
Download remote updatesgit fetchSafe; does not modify current branch content.
Download and integrategit pullFetch plus merge/rebase, depending on configuration.
Upload commitsgit pushSends local commits to remote branch.
Push new branchgit push -u origin <branch>Sets upstream tracking.
Notes and examples

Safe Undo and History Commands

ScenarioPreferWhy
Unstage a filegit restore --staged <file>Keeps working tree changes.
Discard local file changesgit restore <file>Reverts file to last committed state.
Undo a public/shared commitgit revert <commit>Creates a new commit that reverses changes.
Edit most recent local commitgit commit --amendGood before pushing; avoid rewriting shared history.
Temporarily shelve workgit stashUseful before switching branches or pulling.
Reset branch pointergit resetPowerful; can rewrite history or discard work.
Force update remote branchgit push --force-with-leaseSafer than plain force push, but still risky.

Exam trap: revert is usually safer for shared history because it preserves history. reset --hard can discard local changes and rewrite branch state.

GitHub Repository Reference

Repository Visibility

VisibilityWho can see itCommon exam cue
PublicAnyone can viewOpen source, public docs, public examples
PrivateOnly explicitly granted users/teamsRestricted project or confidential source
InternalMembers of an enterprise context, where availableShare across an enterprise without making public

Common Repository Files

File / pathPurpose
README.mdProject overview, usage, setup, status
LICENSETerms under which others may use the project
.gitignoreFiles Git should not track, such as build output or local config
CONTRIBUTING.mdContribution expectations and process
CODE_OF_CONDUCT.mdCommunity behavior expectations
SECURITY.mdVulnerability reporting and supported versions guidance
SUPPORT.mdHow users should request help
CODEOWNERSAutomatically requests reviews from responsible owners
.github/ISSUE_TEMPLATE/Standardizes issue creation
.github/PULL_REQUEST_TEMPLATE.mdStandardizes PR descriptions
.github/workflows/GitHub Actions workflow files
Notes and examples

Repository fundamentals

A repository is the central workspace for a project. It usually contains source code, documentation, configuration files, issue and pull request history, security settings, and automation workflows.

Repository itemPurpose
READMEExplains what the project is and how to use it
LICENSEDefines legal permissions for using, modifying, and distributing the project
.gitignoreTells Git which files not to track
IssuesTrack bugs, tasks, questions, or enhancements
Pull requestsPropose, discuss, review, and merge changes
Actions workflowsAutomate CI/CD or other tasks
BranchesIsolate work before integration
TagsMark specific points in history, often versions
ReleasesPackage and describe versioned software releases

Public, private, and internal repositories

VisibilityMeaningCommon use
PublicVisible to everyoneOpen source, public docs, examples
PrivateVisible only to selected users or teamsProprietary code or restricted projects
InternalVisible within an enterprise contextShared enterprise code and resources

Common trap: repository visibility controls who can see the repository, but permissions still determine what authorized users can do.

GitHub Flow

GitHub Flow is a lightweight branch-and-pull-request model.

    flowchart LR
	    A[Create branch] --> B[Make commits]
	    B --> C[Push branch]
	    C --> D[Open pull request]
	    D --> E[Discuss and review]
	    E --> F[Run checks]
	    F --> G{Ready?}
	    G -- No --> B
	    G -- Yes --> H[Merge]
	    H --> I[Deploy or release]
StepPurposeCommon cue
Create branchIsolate work from default branchFeature, bug fix, experiment
Commit changesRecord small logical snapshotsClear commit messages matter
Open PRStart review and collaborationCompare branch into base branch
ReviewComment, request changes, approveQuality and knowledge sharing
Run checksValidate with CI, tests, scansStatus checks before merge
MergeIntegrate approved changesMethod depends on repository settings
Notes and examples

GitHub Flow

GitHub Flow is a lightweight workflow centered on branches and pull requests.

    flowchart LR
	    A[Create branch] --> B[Make commits]
	    B --> C[Open pull request]
	    C --> D[Discuss and review]
	    D --> E[Run checks]
	    E --> F{Approved and checks pass?}
	    F -- No --> B
	    F -- Yes --> G[Merge]
	    G --> H[Deploy or release]

GitHub Flow decision points

QuestionBest action
Need to start a new feature?Create a branch
Need feedback before merging?Open a pull request
Need automated validation?Use GitHub Actions checks
Need required approval?Use branch protection or rulesets
Need to keep main stable?Require reviews and passing checks before merge

Common trap: a pull request is not only a “request to merge.” It is also a place for review, discussion, checks, and documentation of the change.

Pull Request Essentials

PR conceptMeaningExam trap
Base branchTarget branch that receives changesOften main, but not always
Compare/head branchSource branch containing proposed changesThis is the branch being merged
Draft PRPR not ready for final reviewGood for early feedback
Review commentFeedback on code or PRNot the same as approval
ApproveReviewer accepts the changeMay still require checks to pass
Request changesReviewer blocks until changes are madeUsually requires updates before merge
Status checkCI or external validation resultCan be required by branch protection
Linked issueIssue connected to a PRClosing keywords can close issues on merge
Merge conflictGit cannot automatically combine changesMust be resolved before merge
Notes and examples

Merge Method Selection

MethodWhat it doesChoose when
Merge commitCreates a merge commit preserving branch historyYou want full branch context and non-linear history is acceptable
Squash mergeCombines PR commits into one commit on the base branchYou want a clean main history per PR
Rebase mergeReplays commits onto the base branchYou want linear history while preserving individual commits

Pull requests

A pull request proposes changes from one branch into another. Pull requests are central to GitHub collaboration.

Pull request featureWhy it matters
ConversationDiscuss proposed changes
Review commentsComment on specific lines
Required reviewersEnforce review before merge
Status checksShow CI/test/security results
Linked issuesConnect code changes to tracked work
Draft pull requestSignal that work is not ready for full review
Merge methodsControl how history is integrated

Pull request states and actions

SituationAppropriate action
Work is not readyOpen as draft or keep working on branch
Needs reviewRequest reviewers
Tests failFix commits and push updates
Conflicts existResolve conflicts before merge
Review requires changesUpdate code and re-request review
Ready and allowedMerge using allowed merge method

Merge methods

Merge methodResultCommon reason to use
Merge commitPreserves full branch historyKeep detailed commit history
Squash mergeCombines branch commits into one commitKeep main history clean
Rebase mergeReplays commits without a merge commitMaintain linear history

Common trap: “squash” does not mean the work disappears. It combines multiple commits into a single commit on the target branch.

Branch, Fork, Clone, and Template Decisions

NeedChooseWhy
Work locally on an existing repositoryCloneCreates a local working copy with Git history.
Make a change in a repo where you have write accessBranchKeeps work isolated inside the same repository.
Propose a change without write accessFork plus PRYour fork holds your branch; PR proposes changes upstream.
Start a new project from an existing structureTemplate repositoryCopies files without treating the new repo as the same project history.
Preserve relationship to original projectForkMaintains upstream contribution model.
Share unmerged work for reviewPush branch and open PRLets GitHub show diffs, reviews, and checks.

Feature Selection Matrix

ScenarioGitHub feature to chooseWhy
Track a bug, task, or enhancementIssuesLightweight work item tracking.
Propose and review code changesPull requestsReview, comments, checks, merge workflow.
Organize work across issues and PRsProjectsBoards/tables/roadmaps with fields and views.
Group work for a release or timeboxMilestonesTracks progress across linked issues/PRs.
Categorize issues or PRsLabelsFiltering and triage.
Assign responsibilityAssigneesIdentifies who owns the work item.
Ask open-ended questions or run community conversationsDiscussionsBetter than issues for Q&A and non-task conversations.
Automate builds, tests, or deploymentsGitHub ActionsEvent-driven workflows.
Store workflow secretsGitHub Actions secretsPrevents hard-coding sensitive values.
Store non-sensitive workflow configVariablesReusable configuration without treating it as a secret.
Create cloud development environmentsCodespacesReproducible browser/VS Code development environment.
Publish versioned software deliverablesReleasesRelease notes and downloadable assets around a tag.
Publish packages or containersGitHub PackagesPackage registry integration.
Host a static website or documentationGitHub PagesStatic site hosting from repository content.
Automatically request reviews from ownersCODEOWNERSMaps paths to responsible reviewers.
Enforce merge rulesBranch protection or repository rulesetsRequires reviews, checks, or other policies.
Find vulnerabilities in dependenciesDependabot alertsUses dependency graph information.
Propose dependency updatesDependabot updatesOpens PRs for version updates.
Detect committed secretsSecret scanningAlerts on exposed credentials/tokens.
Detect code vulnerabilitiesCode scanningStatic analysis results in GitHub security views.
Report or coordinate vulnerability disclosureSecurity advisoriesPrivate coordination and disclosure workflow.
Search code and metadataGitHub searchUses qualifiers such as repo:, org:, language:.

Issues, Projects, Discussions, and Planning

FeatureBest forNot best for
IssuesActionable tasks, bugs, enhancementsLong-running open-ended community chat
DiscussionsQ&A, announcements, ideas, community conversationTracking assigned engineering work
ProjectsVisualizing and prioritizing work across itemsStoring source code
MilestonesTracking progress toward a release or goalGeneral categorization
LabelsCategorizing and filteringOwnership or scheduling by themselves
AssigneesShowing who is responsibleCategorization
Templates/formsStandardizing issue or PR inputReplacing triage judgment

High-yield links between planning and code:

  • A PR can be linked to an issue.
  • Closing keywords in a merged PR can close linked issues.
  • Labels help filtering; they do not grant access.
  • Milestones show progress; they do not enforce deadlines.
  • Projects can include issues, PRs, draft items, and custom fields.

GitHub Actions Cheat Sheet

Workflow Anatomy

TermMeaning
WorkflowAutomated process defined in YAML under .github/workflows/.
EventTrigger such as push, pull request, scheduled run, or manual dispatch.
JobGroup of steps that runs on a runner.
StepIndividual command or action in a job.
ActionReusable unit of automation.
RunnerMachine that executes workflow jobs.
GitHub-hosted runnerRunner managed by GitHub.
Self-hosted runnerRunner you manage in your own environment.
ArtifactFile produced by a workflow for later download/use.
CacheReused dependencies/build outputs to speed later runs.
EnvironmentDeployment target with optional protection and secrets.
SecretEncrypted sensitive value used by workflows.
GITHUB_TOKENAutomatically available token for workflow authentication, with permissions controlled by configuration.
Notes and examples

Minimal CI Workflow

name: CI

on:
  pull_request:
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm test

Actions Decision Cues

NeedUse
Run tests on every PRon: pull_request
Run workflow after commits to default branchon: push with branch filter
Manually start workflowworkflow_dispatch
Reuse automation from marketplace or another repouses: action reference
Run shell commandrun:
Test multiple versions/platformsMatrix strategy
Protect deployment targetEnvironments with reviewers/rules
Avoid exposing credentialsSecrets, restricted token permissions, least privilege

Exam trap: GitHub Actions workflow files live in .github/workflows/. A workflow is triggered by events; jobs run on runners; steps run commands or actions.

GitHub Actions fundamentals

GitHub Actions automates workflows such as building, testing, linting, scanning, packaging, releasing, and deploying.

TermMeaning
WorkflowAutomated process defined in YAML
EventTrigger that starts a workflow
JobSet of steps executed on a runner
StepIndividual command or action
ActionReusable automation component
RunnerMachine that executes jobs
ArtifactFile produced by a workflow
SecretEncrypted value used by workflows

Workflow files are stored in:

.github/workflows/

Actions workflow model

Question clueConcept
“Run tests when code is pushed”Event trigger such as push
“Run checks on a pull request”Pull request event
“Use Ubuntu to execute build steps”Runner
“Reuse a published automation task”Action
“Split build and test tasks”Jobs
“Store deployment credential securely”Secrets
“Save build output”Artifacts
“Test across versions”Matrix strategy

Actions vs. other GitHub features

NeedUse
Track a bugIssue
Review a changePull request
Automatically run testsGitHub Actions
Protect merge qualityBranch protection plus required checks
Store a password for workflow useActions secret
Publish package artifactsGitHub Packages or release artifacts, depending on scenario

Common trap: GitHub Actions is for automation. It is not the same thing as GitHub Projects, which is for planning and tracking work.

Identity, Access, and Governance

Account and Organization Model

EntityPurpose
Personal accountIdentity for an individual GitHub user.
OrganizationShared account for teams, repositories, permissions, and collaboration.
TeamGroup of organization members used to manage access and review ownership.
Enterprise accountHigher-level structure for managing multiple organizations and policies.
Outside collaboratorUser with access to specific repositories but not full organization membership.
Notes and examples

Repository Permission Roles

RoleGeneral capability
ReadView and clone repository content.
TriageManage issues and pull requests without write access to code.
WritePush code and manage most collaboration activities.
MaintainManage repository without full access to sensitive/admin settings.
AdminFull repository administration.

Access Control Cues

RequirementUse
Give a group access to many repositoriesOrganization team
Grant limited repo-only access to an external personOutside collaborator
Restrict direct pushes to important branchesBranch protection or rulesets
Require successful CI before mergingRequired status checks
Require human review before mergingRequired pull request reviews
Require specific path owners to reviewCODEOWNERS
Centralize policies across organizationsEnterprise-level governance, where applicable
Investigate administrative activityAudit log, where available

Permissions and access control

GitHub access is organized around personal accounts, organizations, teams, repositories, and roles.

ConceptMeaning
Personal accountIdentity for an individual user
OrganizationShared account for teams and projects
TeamGroup of organization members
Repository rolePermission level for a repository
EnterpriseHigher-level structure for multiple organizations in enterprise use

Permission decision rules

ScenarioConcept to review
A user can view but not pushRepository permission level may be read-only
A team needs access to several reposUse organization teams
External helper needs limited accessAssign the minimum necessary permission
Sensitive branch needs controlUse branch protection or rulesets
Automation needs accessUse appropriate token, GitHub App, or secret handling

Common trap: authentication proves who you are; authorization controls what you can do.

Authentication and Credential Safety

Method / conceptUseWatch for
Browser sign-inInteractive GitHub useProtect with strong authentication.
Two-factor authenticationAdds a second verification factorImportant account security control.
SSH keyAuthenticate Git operations over SSHProtect private key.
HTTPS with tokenAuthenticate Git operations over HTTPSPasswords are not the normal Git auth method for GitHub operations.
Personal access tokenScript/API/Git authentication with scoped accessScope narrowly and rotate/revoke when needed.
Fine-grained tokenMore targeted token permissionsPrefer least privilege when supported by the scenario.
GitHub AppIntegration with scoped, installable permissionsOften preferred for app-to-GitHub automation.
OAuth AppUser-authorized app accessActs based on user authorization.
SecretEncrypted sensitive workflow valueDo not print secrets in logs or commit them.
Notes and examples

Credential handling rules to remember:

  • Never commit passwords, API keys, private keys, or cloud credentials.
  • Use .gitignore to keep local config and generated secrets out of Git.
  • If a secret is committed, assume it is exposed: revoke, rotate, and remove it from history if needed.
  • Store CI/CD credentials as GitHub Actions secrets or environment secrets.
  • Give tokens only the permissions required for the task.

Security Features

FeatureDetects / managesTypical scenario
Dependency graphProject dependenciesFoundation for dependency security features.
Dependabot alertsKnown vulnerable dependencies“Notify me when a dependency has a vulnerability.”
Dependabot updatesDependency version update PRs“Keep dependencies current automatically.”
Code scanningPotential vulnerabilities in codeStatic analysis and security findings.
Secret scanningSecrets committed to repositoriesPrevent credential exposure.
Security advisoriesVulnerability coordination and disclosurePrivately coordinate a fix before public disclosure.
Branch protection / rulesetsRisky changes to important branchesRequire review, checks, signed commits, or other rules.
CODEOWNERSRequired or suggested reviewers by pathEnsure knowledgeable review.
Notes and examples

High-yield distinction:

NeedChoose
Vulnerable dependency notificationDependabot alerts
Automated dependency PRsDependabot updates
Secret accidentally committedSecret scanning plus credential rotation
Static code security analysisCode scanning
Prevent unreviewed change to default branchBranch protection or rulesets

Security features on GitHub

GitHub includes multiple security features that help identify and reduce risk.

FeaturePurpose
Dependabot alertsIdentify vulnerable dependencies
Dependabot updatesPropose dependency updates
Secret scanningDetect committed secrets
Code scanningFind code vulnerabilities and errors
CodeQLSemantic code analysis engine used with code scanning
Security advisoriesCoordinate vulnerability disclosure and fixes
Private vulnerability reportingAllows responsible reporting where enabled
Branch protectionPrevent risky changes from merging
Audit logsTrack activity in organization or enterprise contexts

Security feature decision table

ScenarioBest GitHub feature
Dependency has known vulnerabilityDependabot alert
Need automated dependency update PRsDependabot updates
Token accidentally committedSecret scanning
Need static analysis for code flawsCode scanning
Need maintainers to coordinate a vulnerability fixSecurity advisory
Need to require review before mergeBranch protection
Need to see who changed settingsAudit log

Common trap: Dependabot focuses on dependencies. Code scanning focuses on code. Secret scanning focuses on leaked credentials or secrets.

Markdown and GitHub-Flavored Markdown

NeedSyntax
Heading## Section
Bold**text**
Italic*text*
Link[label](https://example.com)
Image![alt text](image.png)
Inline code`code`
Fenced code blockTriple backticks before and after code
Unordered list- item
Ordered list1. item
Task list- [ ] task and - [x] done
Blockquote> quoted text
TablePipes and header separators
Mention user/team@username or @org/team
Reference issue/PR#123
Close issue from PRFixes #123, Closes #123, or similar closing keyword

Markdown commonly appears in:

  • README.md
  • Issues and pull requests
  • Discussions
  • Wikis
  • Release notes
  • Comments and reviews

Search, Notifications, and Repository Signals

Search Qualifiers

QualifierExampleUse
repo:repo:owner/name testSearch within a repository.
org:org:example topicSearch within an organization.
user:user:octocatSearch user-owned content.
language:language:pythonFilter by programming language.
path:path:docsFilter by path.
filename:filename:README.mdFind specific filenames.
is:issueis:issue is:openSearch issues.
is:pris:pr is:closedSearch pull requests.
label:label:bugFilter by label.
assignee:assignee:@meFind assigned work.
author:author:usernameFind items by creator.
Notes and examples

Repository Social and Notification Features

FeatureMeaning
WatchSubscribe to repository notifications.
StarBookmark or show interest in a repository.
ForkCreate your own copy of a repository.
FollowSubscribe to a user’s public activity.
MentionNotify a user or team using @.
Review requestAsk a person or team to review a PR.
Notification inboxCentral place to manage GitHub notifications.

GitHub Pages, Releases, Packages, and Codespaces

FeaturePrimary purposeChoose when
GitHub PagesStatic website hostingPublish docs, portfolio, project site, simple static content.
ReleasesVersioned distributionPublish release notes, source snapshots, binaries/assets.
TagsGit references to specific commitsMark versions or important points in history.
GitHub PackagesPackage hostingPublish packages/containers tied to GitHub workflows and permissions.
CodespacesCloud development environmentNeed consistent dev setup without local machine configuration.
Dev container configDefines Codespaces/container environmentNeed reproducible tools, extensions, dependencies.
Notes and examples

GitHub Pages, Packages, and Releases

FeaturePurpose
GitHub PagesHost static websites from a repository
GitHub PackagesHost and manage packages
ReleasesPublish versioned software and release notes
TagsMark specific commits, often for versions

Decision rules:

ScenarioUse
Host project documentation websiteGitHub Pages
Publish a version with release notesGitHub Releases
Mark a version in Git historyGit tag
Store package artifactsGitHub Packages

Common trap: a tag identifies a point in Git history; a release is a GitHub object that can add release notes and assets around a tag.

Common Exam Traps

TrapCorrect answer pattern
“I committed, so the code is on GitHub.”Not until you push to a remote.
“I pushed, so it is merged.”Push updates a branch; merge integrates into the target branch.
“A PR is only for code review.”PRs also host discussion, checks, linked issues, and merge decisions.
“Use an issue for every conversation.”Use Discussions for open-ended Q&A or community conversations.
“Use a fork when I have write access and just need a feature branch.”Use a branch in the same repo when appropriate.
“Use reset to undo public commits.”Prefer revert for shared history.
“Labels control permissions.”Labels categorize; permissions come from roles, teams, and policies.
“Projects store source code.”Repositories store code; Projects organize work.
“Secrets belong in workflow YAML.”Store sensitive values in secrets, not in repository files.
“Dependabot, code scanning, and secret scanning do the same thing.”They address dependencies, code analysis, and credential exposure respectively.
“GitHub Actions job equals workflow.”Workflow contains one or more jobs; jobs contain steps.
“A release and a tag are identical.”A release is GitHub metadata/assets around a tag.
Notes and examples

Trap 1: Confusing Git actions with GitHub features

Candidate answerWhy it may be wrong
Use GitHub Actions to save file historyGit commits save history
Use issues to merge codePull requests merge code
Use GitHub Projects to run testsGitHub Actions runs automation
Use Dependabot for leaked tokensSecret scanning detects secrets
Use code scanning for dependency updatesDependabot handles dependency vulnerability alerts and updates

Trap 2: Confusing visibility with permissions

A private repository limits visibility, but users still need the correct role to read, write, maintain, or administer. A public repository may be visible to everyone, but not everyone can push to it.

Trap 3: Treating pull requests as only a merge button

Pull requests support:

  • Code review
  • Discussion
  • Automated checks
  • Linked issues
  • Review approvals
  • Change history
  • Merge control

Trap 4: Assuming local commits are already on GitHub

A commit is local until pushed. If the scenario says the developer committed changes but teammates cannot see them, the likely missing step is git push.

Trap 5: Choosing forks when branches are enough

If a developer has write access to the repository, a branch is often enough. Forks are especially useful when the contributor does not have write access or wants an independent copy.

Trap 6: Confusing Actions secrets with repository secrets in code

Secrets should be stored securely using GitHub secret management, not committed into source files, configuration files, or documentation.

Trap 7: Confusing releases and tags

A tag marks a commit. A release is a GitHub feature that uses a tag and can include release notes and assets.

Last-Minute Decision Checklist

Before answering a GH-900 scenario question, identify the target:

  1. Version control action? Think Git commands: commit, branch, merge, fetch, pull, push, revert.
  2. Code collaboration? Think pull request, review, checks, branch protection, CODEOWNERS.
  3. Work tracking? Think issues, labels, assignees, milestones, Projects.
  4. Community conversation? Think Discussions, not Issues.
  5. Automation? Think GitHub Actions: workflow, event, job, step, runner, secret.
  6. Security finding? Match the tool: Dependabot, code scanning, secret scanning, security advisory.
  7. Access control? Think organization, team, role, outside collaborator, repository visibility.
  8. Publishing? Think Pages for static sites, Releases for versions/assets, Packages for package artifacts.
  9. Cloud development environment? Think Codespaces and dev containers.
  10. Policy enforcement? Think branch protection, rulesets, required reviews, required checks.

Git workflow essentials

You do not need to be a Git expert for GH-900, but you should understand the basic lifecycle.

StepTypical command or actionMeaning
Get a repositorygit cloneCopy a remote repository locally
Inspect changesgit status, git diffSee what changed
Stage filesgit addChoose changes for the next commit
Save snapshotgit commitRecord changes in local history
Share changesgit pushSend local commits to a remote
Get remote changesgit pullFetch and integrate changes
Fetch onlygit fetchDownload remote updates without merging
Create branchgit branch or git switch -cStart isolated work
Merge workgit mergeCombine branch histories
View historygit logInspect commits
Notes and examples

Working directory, staging area, repository

AreaWhat it containsCandidate mistake
Working directoryFiles you are editingThinking edited files are automatically committed
Staging areaSelected changes for the next commitForgetting to stage changes
Local repositoryLocal commit historyThinking local commits are already on GitHub
Remote repositoryHosted repository, often on GitHubConfusing commit with push

Decision rule:

  • Commit saves changes locally.
  • Push sends commits to GitHub.
  • Pull brings remote changes down and integrates them.
  • Fetch brings remote data down without integrating it.

Branches, commits, merges, and conflicts

Branches allow parallel work. A branch is a movable pointer to a commit, not a full copy of the repository.

ConceptReview point
CommitSnapshot of tracked changes with metadata
BranchIndependent line of development
Default branchMain integration branch, often named main
MergeCombines changes from one branch into another
Merge conflictOccurs when Git cannot automatically combine changes
TagNamed reference to a specific commit, often used for versions

Merge conflicts

A merge conflict means Git needs human judgment. The usual process is:

  1. Identify conflicted files.
  2. Edit the files to keep the correct content.
  3. Mark the conflicts as resolved.
  4. Commit the resolution.
  5. Continue the merge or pull request workflow.

Common trap: a conflict is not an error in GitHub itself. It is Git asking for a decision between incompatible changes.

Forks vs. branches

Use casePrefer this
You have write access to the repositoryCreate a branch in the repository
You do not have write accessFork the repository and open a pull request
You want to contribute to open sourceFork, branch, commit, push, open pull request
You want isolated internal feature workBranch
You want your own copy under your accountFork

A fork is a copy of a repository under another account or organization. A branch is a separate line of work inside a repository.

Common trap: forks and branches both support parallel work, but they solve different permission and ownership problems.

Issues, discussions, and pull requests

FeatureBest forNot best for
IssuesBugs, tasks, enhancements, work trackingLong-form community Q&A if Discussions is enabled
Pull requestsReviewing and merging code changesGeneral planning with no code changes
DiscussionsQuestions, ideas, announcements, community conversationFormal code review
ProjectsPlanning, tracking, and visualizing workReplacing Git history
  • Use an issue to track work.
  • Use a pull request to propose code changes.
  • Use a discussion for broader conversation.
  • Use a project to organize and visualize work across issues and pull requests.

GitHub project management

GitHub includes features that support planning and tracking directly near the code.

FeaturePurpose
LabelsCategorize issues and pull requests
MilestonesGroup work toward a target or release
AssigneesShow who is responsible
ProjectsTrack work using tables, boards, fields, and views
Task listsBreak work into checklist items
MentionsNotify users or teams
NotificationsKeep users informed about relevant activity

Labels vs. milestones vs. projects

NeedUse
Categorize work by type or priorityLabels
Group work for a release or deadlineMilestones
Visualize and manage work across itemsProjects
Assign ownershipAssignees
Track smaller steps in one itemTask lists

Common trap: labels and milestones do not replace project planning views; they add metadata that can help organize planning.

Markdown and documentation

GitHub uses Markdown widely in README files, issues, pull requests, comments, discussions, and wikis.

Markdown elementExample purpose
HeadingsStructure documentation
ListsSteps, requirements, notes
LinksReference docs, issues, pull requests
ImagesScreenshots, diagrams
Code blocksShow commands or examples
Task listsTrack checklist items
TablesCompare options

Documentation files with high exam relevance:

FilePurpose
README.mdProject overview and usage
CONTRIBUTING.mdContribution guidelines
CODE_OF_CONDUCT.mdCommunity behavior expectations
LICENSELegal terms for reuse
SECURITY.mdSecurity policy and vulnerability reporting
Issue templatesStandardize issue submissions
Pull request templateStandardize PR descriptions

Common trap: a repository without a license is not automatically “free to use” just because it is public.

Authentication and secure access

GitHub supports several ways to authenticate and connect tools.

MethodTypical use
Username and browser sessionWeb access
Multi-factor authenticationStronger account protection
Personal access tokenHTTPS Git or API access where token-based auth is needed
Fine-grained tokenMore limited, specific access
SSH keyGit operations over SSH
GitHub CLI authenticationCommand-line GitHub workflows
GitHub AppIntegration with controlled permissions
OAuth AppThird-party authorization flow
Notes and examples

Security decision rules

NeedLikely solution
Protect account loginEnable multi-factor authentication
Avoid password use for Git operationsUse SSH key or token-based authentication
Limit automation permissionsUse least privilege permissions
Store workflow secretsUse GitHub Actions secrets
Avoid exposing credentialsNever commit secrets to repositories

Common trap: a secret stored in code is not protected just because the repository is private. Secrets should be managed through appropriate secret storage and access controls.

Branch protection and repository rules

Branch protection and rulesets help enforce quality and security before changes reach important branches.

ControlWhat it helps enforce
Require pull request reviewsHuman review before merge
Require status checksTests or checks must pass
Restrict who can pushLimit direct changes
Require linear historyAvoid merge commits if desired
Require signed commitsStrengthen commit authenticity
Prevent force pushesProtect branch history
Prevent deletionProtect critical branches

Common exam pattern: choose branch protection when the scenario says the team wants to prevent unreviewed or failing code from being merged into the default branch.

CI/CD basics

For GH-900, understand CI/CD conceptually.

TermMeaning
Continuous integrationFrequently integrate and validate code changes
Continuous deliveryKeep software ready to release
Continuous deploymentAutomatically deploy validated changes
BuildCompile or package software
TestValidate behavior or quality
DeployRelease software to an environment

Typical CI pattern:

  1. Developer opens pull request.
  2. GitHub Actions workflow runs tests.
  3. Status check reports pass or fail.
  4. Branch protection requires passing checks.
  5. Pull request is reviewed and merged.

Common trap: CI/CD is not only deployment. A workflow that runs tests on every pull request is also CI.

GitHub Advanced Security concepts

Some GitHub security capabilities may be discussed as part of the broader GitHub platform. For foundational review, focus on what the features do rather than licensing details.

CapabilityCore idea
Secret scanningDetect secrets in repositories
Code scanningAnalyze source code for security issues
Dependency reviewShow dependency changes and risk in pull requests
DependabotAlert on and help update vulnerable dependencies

Decision rule: if the question is about identifying a password, token, or key in code, think secret scanning, not code scanning.

GitHub Codespaces

GitHub Codespaces provides cloud-hosted development environments.

ConceptReview point
CodespaceCloud development environment connected to a repository
Dev containerConfiguration for a consistent development environment
Browser-based developmentWork without local setup
Standardized onboardingReduce “works on my machine” problems
Preconfigured toolsInstall dependencies and extensions consistently

Common use cases:

  • New contributors can start quickly.
  • Teams can standardize development environments.
  • Training or workshops can avoid local setup issues.
  • Developers can work from different devices.

Common trap: Codespaces is a development environment. It is not the same as GitHub Actions, which runs automation workflows.

GitHub Copilot

GitHub Copilot is an AI-powered coding assistant. For a foundations exam, know the basic concept and responsible-use mindset.

ConceptReview point
Code suggestionsCopilot can suggest code as you work
Chat assistanceCopilot can help explain, generate, or refactor code
Developer controlDevelopers remain responsible for reviewing output
Productivity supportHelps with boilerplate, examples, and exploration

Common trap: Copilot suggestions are not automatically correct, secure, or license-safe. A developer must review, test, and validate code.

Open source collaboration

Open source work on GitHub often combines code, documentation, governance, and community expectations.

File or featureWhy it matters
READMEHelps users understand the project
LICENSEDefines reuse rights
CONTRIBUTINGExplains how to contribute
CODE_OF_CONDUCTSets community behavior standards
SECURITYExplains how to report vulnerabilities
IssuesTrack bugs and feature requests
DiscussionsCommunity Q&A and ideas
Pull requestsPropose changes
ForksContribute without direct write access

Contribution workflow

  1. Find or create an issue.
  2. Fork the repository if you lack write access.
  3. Create a branch.
  4. Make commits.
  5. Push to your fork.
  6. Open a pull request.
  7. Respond to review comments.
  8. Maintainer merges if accepted.

Common trap: public visibility does not automatically grant write access. Contributors usually propose changes through forks and pull requests.

Search, navigation, and discovery

GitHub provides search and navigation features to find repositories, code, issues, pull requests, users, and discussions.

NeedGitHub capability
Find a repositoryRepository search
Find codeCode search
Find open bugsIssue search and filters
Find pull requests needing reviewPull request filters
Find project activityNotifications and activity feeds
Find a file quicklyRepository file navigation
Find ownership guidanceCODEOWNERS file, if present

Useful search concepts

ConceptPurpose
FiltersNarrow results by state, author, label, language, etc.
Saved views or project viewsReuse a work-tracking perspective
MentionsNotify users or teams
Watch settingsControl repository notifications

Common trap: assigning someone to an issue is not the same as mentioning them. Assignment indicates responsibility; mention notifies or references.

CODEOWNERS and review ownership

A CODEOWNERS file can define individuals or teams responsible for parts of a repository.

ScenarioCODEOWNERS helps by
Specific team owns a directoryAutomatically suggests or requires reviewers
Critical files need expert reviewMaps file paths to owners
Large repo needs review routingSends changes to relevant maintainers

Common trap: CODEOWNERS identifies ownership and can support review workflows, but branch protection or rules must enforce required review where needed.

Notifications and collaboration signals

SignalMeaning
WatchingSubscribe to repository activity
StarringBookmark or show interest
ForkingCreate a copy under your account
MentioningNotify a user or team
AssigningIndicate responsibility
Requesting reviewAsk for pull request review
SubscribingFollow a specific issue or pull request

Common trap: starring a repository does not give access, create a copy, or subscribe you to every workflow notification.

High-yield “which feature?” table

If the question says…Think…
“Track a bug or enhancement”Issue
“Discuss a proposed code change”Pull request
“Require approval before merge”Branch protection / rulesets
“Run tests automatically”GitHub Actions
“Detect leaked credentials”Secret scanning
“Find vulnerable dependencies”Dependabot alerts
“Create dependency update PRs”Dependabot updates
“Analyze code for vulnerabilities”Code scanning
“Host a static site”GitHub Pages
“Develop in a browser environment”Codespaces
“Publish version notes and binaries”Releases
“Mark a version in Git history”Tags
“Organize work visually”Projects
“Categorize issues”Labels
“Group work for a release”Milestones
“Give a team repository access”Organization teams
“Contribute without write access”Fork and pull request
“Standardize issue creation”Issue templates
“Standardize PR descriptions”Pull request template
“Route reviews by file path”CODEOWNERS

Scenario decision practice

Use this section like a mini topic drill before moving into original practice questions.

ScenarioBest answerWhy
A team wants tests to run whenever a PR is openedGitHub ActionsPR events can trigger workflows
A maintainer wants to prevent direct pushes to mainBranch protection or rulesetsEnforces merge requirements
A contributor lacks write access but wants to propose a fixFork and open PRStandard open source contribution model
A team wants to track bugs and assign ownersIssuesIssues are for work tracking
A project needs release notes and downloadable assetsGitHub ReleasesReleases package version information
A team wants a consistent cloud dev environmentCodespacesProvides hosted development environments
A token is accidentally committedSecret scanningDetects exposed secrets
A dependency has a known vulnerabilityDependabot alertIdentifies vulnerable dependencies
A repository needs contribution instructionsCONTRIBUTING fileGuides contributors
A project needs legal reuse termsLICENSE fileDefines usage rights
A team wants to route frontend file changes to frontend reviewersCODEOWNERSMaps paths to owners

Review checklist before question-bank practice

Use this checklist to identify weak spots before attempting a mock exam.

Git and repository basics

  • Can you explain Git vs. GitHub?
  • Can you distinguish clone, commit, push, pull, and fetch?
  • Can you explain branches, merges, conflicts, tags, and releases?
  • Can you describe what .gitignore does?
  • Can you explain local vs. remote repositories?
Notes and examples

Collaboration

  • Can you explain the purpose of issues, pull requests, discussions, and projects?
  • Can you choose between a fork and a branch?
  • Can you describe GitHub Flow?
  • Can you explain pull request review and status checks?
  • Can you identify when to use labels, milestones, assignees, and project views?

Automation

  • Can you define workflow, event, job, step, action, and runner?
  • Can you identify when GitHub Actions is the right answer?
  • Can you explain how CI checks connect to pull requests?
  • Can you distinguish artifacts, secrets, and runners?

Security and administration

  • Can you distinguish authentication from authorization?
  • Can you explain MFA, tokens, SSH keys, and secrets at a high level?
  • Can you match secret scanning, code scanning, and Dependabot to scenarios?
  • Can you explain branch protection and required checks?
  • Can you describe teams, organizations, and repository permissions?

Community and productivity

  • Can you explain README, LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, and SECURITY files?
  • Can you describe Codespaces, Copilot, Pages, Packages, and Releases?
  • Can you identify common open source contribution steps?
  • Can you explain notifications, mentions, stars, watchers, and forks?

Final quick pass

Before your next practice set, remember these anchors:

  • Git tracks changes; GitHub enables collaboration around them.
  • Issues track work; pull requests review and merge changes.
  • Actions automate workflows; Projects organize work.
  • Dependabot handles dependency risk; secret scanning finds exposed secrets; code scanning analyzes code.
  • Branches isolate work; forks support independent copies and external contributions.
  • Branch protection helps enforce review and quality gates.
  • README explains, LICENSE permits, CONTRIBUTING guides, SECURITY reports.
  • Codespaces is a cloud development environment; Actions is automation.
  • Tags mark versions; Releases publish version information and assets.

Next step: use this Cheat Sheet to choose your weakest GH-900 topic, complete a focused topic drill, and read the detailed explanations before moving to a mixed mock exam.

Put the review into practice