How to use this topic

The first eleven pages are about Git itself: what version control is, how Git stores your work, committing, history, branches, merging, rebasing, undoing mistakes, working with remotes and organizing branches and releases. The next three pages cover GitHub: its features, pull requests and code review, and keeping repositories secure. The last six pages are about CI/CD: pipelines, GitHub Actions, testing, deployment and GitOps, other platforms, and automating network changes. The tests a pipeline runs are explained in Testing & QA, and pipelines that change infrastructure in Infrastructure as Code in Pipelines.

Almost every Git example on these pages was run exactly as shown and printed the output below it — including the commit hashes, because the examples use a fixed author (Sam Rivera) and a fixed date. On your own machine the hashes will differ, but everything else will look the same. Shared repositories are simulated with a folder on the same machine, so no network or account is needed to try them.

Pages are tagged with the certifications they help with: GitHub Foundations (exam GH-900) and GitHub Actions (exam GH-200).

Learning path

  1. 01What Is Version Control?Why every team keeps its files under version control, the difference between centralized and distributed systems, and how Git became the standard.BeginnerGitHub Foundations
  2. 02Your First RepositorySetting up Git and making a first commit: installing and configuring Git, creating or cloning a repository, and the everyday cycle of status, add and commit.BeginnerGitHub Foundations
  3. 03How Git Stores Your WorkWhat is inside the .git folder: blobs, trees and commits, the hashes that name them, and the references — branches, tags and HEAD — that point to them.IntermediateGitHub Foundations
  4. 04Staging and CommittingBuilding good commits: the staging area, viewing changes with diff, staging only part of a file, ignoring files, writing clear commit messages and fixing the last commit.BeginnerGitHub Foundations
  5. 05Exploring HistoryFinding your way through a project's past: git log and its filters, show and diff between commits, blame to see who changed a line, and bisect to find the commit that broke something.IntermediateGitHub Foundations
  6. 06BranchesHow branches let you work on several things at once: creating and switching branches, what HEAD points to, the default branch, and the detached HEAD state.BeginnerGitHub Foundations
  7. 07Merging and ConflictsBringing work back together: fast-forward and three-way merges, merge commits, and resolving a merge conflict step by step without losing anyone's changes.IntermediateGitHub Foundations
  8. 08Rebasing and Rewriting HistoryChanging history safely: rebasing a branch, squashing commits, cherry-picking a single commit, force pushing with care, and the rule never to rewrite history others already use.AdvancedGitHub Foundations
  9. 09Undoing ThingsHow to get out of trouble: discarding changes with restore, the three modes of reset, reverting a published commit, stashing unfinished work and recovering almost anything with the reflog.IntermediateGitHub Foundations
  10. 10Remotes and CollaborationWorking with others through shared repositories: remotes and origin, fetch, pull and push, remote-tracking branches, upstreams and forks.BeginnerGitHub Foundations
  11. 11Branching Strategies and ReleasesHow teams organize branches and versions: GitHub flow, trunk-based development and Git flow, release branches, tags, semantic versioning and conventional commit messages.IntermediateGitHub Foundations
  12. 12GitHub EssentialsWhat GitHub adds on top of Git: repositories and their settings, issues, Projects, Markdown, Discussions, Codespaces and Copilot, and the open source community around it.BeginnerGitHub Foundations
  13. 13Pull Requests and Code ReviewProposing and reviewing changes on GitHub: the pull request workflow, good reviews, code owners, branch protection and rulesets, required checks, merge methods and the merge queue.IntermediateGitHub Foundations
  14. 14Securing RepositoriesKeeping code and credentials safe: what never belongs in Git, removing a leaked secret, secret scanning and push protection, Dependabot, code scanning, signed commits, tokens and SSH keys.IntermediateGitHub Foundations
  15. 15What Is CI/CD?How continuous integration and delivery turn every change into a tested, deployable result: pipelines and stages, builds and artifacts, environments, pipeline as code and the metrics that show it works.BeginnerGitHub FoundationsGitHub Actions
  16. 16GitHub ActionsAutomating work on GitHub: workflows, triggers, jobs, steps and runners, using and pinning actions, matrices, secrets, the GITHUB_TOKEN, caching and artifacts, and reusable workflows.IntermediateGitHub FoundationsGitHub Actions
  17. 17Testing and Quality in PipelinesWhat a pipeline checks before code moves on: the test pyramid, unit, integration and end-to-end tests, linting and formatting, code coverage, security scanning and quality gates.IntermediateGitHub Actions
  18. 18Deployment Pipelines and GitOpsGetting tested code into production safely: environments and promotion, approvals, deployment strategies, push versus pull deployment, and GitOps with Argo CD and Flux.AdvancedGitHub Actions
  19. 19Other CI/CD PlatformsThe same ideas in other tools: GitLab CI/CD, Azure Pipelines and Jenkins compared with GitHub Actions, and how to choose between them.Intermediate
  20. 20Network Automation with Git and CI/CDTreating network configuration as code: configs and templates in Git, a source of truth, Ansible, and pipelines that validate network changes before they reach a device.Intermediate

Git & CI/CD glossary

Short definitions of the terms used in this topic. The full glossary covers every topic.