Skip to content

GH-900: Cheatsheet โ€‹

โ† Overview ยท โ† Exam Guide


Git Workflow Mnemonic: C-B-C-P โ€‹

Clone โ†’ Branch โ†’ Commit โ†’ Pull Request

StepCommand / Action
Clonegit clone <url> โ€” get the repo locally
Branchgit checkout -b feature/my-work โ€” isolate changes
Commitgit add . && git commit -m "message" โ€” save snapshots
Pull RequestPush branch โ†’ open PR on GitHub โ†’ review โ†’ merge

For open source add a Fork at the start: F-C-B-C-P


GitHub vs Git: Quick Split โ€‹

GitGitHub
Commits, branches, mergesPull Requests, Issues, Discussions
Working dir, staging, repoActions, Codespaces, Projects
git push/pull/cloneMarketplace, Stars, Sponsors
Runs locallyRuns in the cloud

Editor Quick Reference โ€‹

ToolTerminal?Run code?CostOpen how
github.devโŒโŒFreePress .
Codespacesโœ…โœ…Compute billingNew Codespace button
GitHub DesktopโŒโŒFreeApp download

Merge Strategies โ€‹

StrategyCreates merge commit?History
Merge commitโœ… YesFull history preserved
Squash and mergeโŒ NoAll commits โ†’ 1 commit
Rebase and mergeโŒ NoLinear, replayed commits

PR Auto-Close Keywords โ€‹

Fixes ยท Closes ยท Resolves + #issue-number

Only closes when merged to the default branch.


Repo Visibility โ€‹

VisibilityWho sees itWhen to use
PublicEveryoneOpen source
PrivateInvited collaboratorsPersonal/commercial
InternalAll org membersInnerSource (GHEC only)

Permission Levels (Low โ†’ High) โ€‹

Read โ†’ Triage โ†’ Write โ†’ Maintain โ†’ Admin

  • Outside Collaborators: specific repo access, not org members
  • Teams grant permissions across repos at one level
  • Highest permission wins when multiple apply

Security Feature Cheatsheet โ€‹

FeatureWhat it does
Secret scanningDetects secrets in committed code
Push protectionBlocks push if secret detected (before commit)
Dependabot alertsNotifies of vulnerable dependencies
Dependabot security updatesAuto-PR to fix vulnerabilities
Dependabot version updatesAuto-PR to keep deps current
Code scanningFinds security bugs in code (CodeQL)
Branch protectionEnforces review, status checks on branches

Branch Protection Quick Rules โ€‹

Need CI to pass? โ†’ Require status checks Need 2 approvals? โ†’ Require N approving reviews New commit resets approval? โ†’ Dismiss stale reviews Apply to admins too? โ†’ Include administrators Prevent direct push? โ†’ Restrict who can push


Issues vs Discussions vs Projects vs Milestones โ€‹

ToolBest forCross-repo?Links to PR?
IssuesBugs, tasksโŒ Single repoโœ… Yes
DiscussionsQ&A, ideas, announcementsโŒ Single repoโŒ No
ProjectsTracking and planningโœ… Yesโœ… Yes
MilestonesDeadline-based groupingโŒ Single repoโœ… Yes

Open Source Licenses (Permissive vs Copyleft) โ€‹

TypeLicensesKey rule
PermissiveMIT, Apache 2.0, BSDKeep copyright notice
CopyleftGPL v3, AGPLDerivatives must use same license
No licenseโ€”All rights reserved

GitHub Community Programs โ€‹

  • GitHub Stars โ€” recognition for community educators/influencers
  • GitHub Sponsors โ€” financial support for OSS devs (GitHub takes 0%)
  • GitHub Education โ€” Student Pack (free tools), Classroom (for educators)
  • Campus Expert โ€” student community leaders program
  • InnerSource โ€” open source practices inside an org (internal repos)

Key File Locations โ€‹

FileLocationPurpose
CODEOWNERSRoot / docs/ / .github/Auto-assign PR reviewers
CONTRIBUTING.mdRootHow to contribute
CODE_OF_CONDUCT.mdRootCommunity behavior rules
PULL_REQUEST_TEMPLATE.md.github/Default PR description
ISSUE_TEMPLATE/.github/Issue submission forms
dependabot.yml.github/Dependabot configuration
Workflow files.github/workflows/GitHub Actions YAML
devcontainer.json.devcontainer/Codespace configuration

โ† Overview ยท โ† Exam Guide

Happy Studying! ๐Ÿš€ โ€ข Privacy-friendly analytics โ€” no cookies, no personal data
Privacy Policy โ€ข AI Disclaimer โ€ข Report an issue