Understand Git and GitHub Basics Study Guide — GH-900

28% of the exam · domain 1 of 7 · GitHub Foundations · Free Understand Git and GitHub Basics practice questions

0 of 57 topics covered
What the exam asks here — tap to tick off0 / 10 covered
Domain 1 of 7

Introduction to Git and GitHub

This domain covers the foundational concepts of Git as a version control system and GitHub as a collaboration platform. It accounts for 22% of the GitHub Foundations exam, making it the single most-weighted domain. Questions test precise definitions, feature-to-plan mappings, naming of specific GitHub features, and the ability to distinguish between closely related concepts (e.g., rebase vs. merge, organization vs. enterprise, Free vs. Team plan).


Git vs GitHub: Version Control System vs Collaboration Platform

Git is a free, open-source distributed version control system (DVCS) created by Linus Torvalds in 2005. It runs locally on your machine and requires no internet connection or GitHub account.

GitHub is a cloud-based collaboration platform built on top of Git. It adds hosting, access control, project management, CI/CD, and AI features that Git itself does not provide.

AttributeGitGitHub
TypeVersion control systemCollaboration platform
Created byLinus Torvalds (2005)Tom Preston-Werner et al. (2008)
Runs whereLocally on any machineCloud (github.com) + GitHub Enterprise Server
Internet requiredNoYes (for cloud features)
Core functionTrack file changes over timeHost repos + enable team collaboration
Owned byOpen-source / Software Freedom ConservancyMicrosoft (acquired 2018)
Can exist without the otherYes — Git works without GitHubNo — GitHub requires Git

Common traps

  • The exam may ask what Git provides that GitHub does not (offline version control, branching, local commits). Git does not provide Issues, Pull Requests, or Actions — those are GitHub features.
  • GitHub is not the only Git hosting platform (GitLab, Bitbucket also exist), but the exam focuses exclusively on GitHub.
  • "GitHub is a version control system" is a false statement; it is a platform that uses Git.

Git Core Concepts

Bold terms below appear directly in exam questions.

ConceptDefinitionKey detail
Repository (repo)A directory tracked by Git, containing all files and their historyCan be local or remote
CommitA snapshot of tracked changes with a unique SHA-1 hashImmutable once created; requires a message
BranchA lightweight movable pointer to a specific commitDefault branch is named main (was formerly master)
MergeCombines the history of two branches, creating a merge commitPreserves full history
RebaseMoves or re-applies commits from one branch onto another baseRewrites commit history; creates linear history
TagA named, static pointer to a specific commitUsed to mark release points (e.g., v1.0.0)
CloneCreates a full local copy of a remote repositoryIncludes all history
ForkA GitHub-side copy of a repo under a different accountEnables contribution without direct write access
Pull Request (PR)A GitHub feature to propose merging one branch into anotherNot a Git concept — GitHub only
Staging area (index)Intermediate area where changes are prepared before committinggit add moves changes here
HEADA pointer to the currently checked-out commit or branchDetached HEAD = pointing directly to a commit

Merge vs. Rebase — decision flow:

How Git handles branching, merging, and rebasing

Common traps

  • Rebase rewrites history — the exam tests whether you know it is unsafe on shared/public branches.
  • A fork is a GitHub concept; a clone is a Git concept. Forking does not exist in Git itself.
  • Tags are not branches — tags are static and do not move when new commits are added.
  • The default branch name is main, not master, on newly created GitHub repositories (changed in 2020).
  • A merge commit has two parent commits; a regular commit has one.

Worked scenario

A developer wants to contribute to an open-source project where they do not have write access.

Reasoning: The developer must fork the repository to their own account (GitHub feature), clone that fork locally (Git), make changes, push to the fork, then open a Pull Request to the original repository. They cannot push directly to the upstream repo.


Sign in free to read the full guide

11 more sections (about 2,825 words) continue below. The first domain's study guide is free for every GH-900 learner with a free account.