DevOps and quality

Git, GitHub and the Command Line

Branching, rebasing, pull requests, Actions and the shell skills teams expect.

  • Handwritten-style
  • Diagrams and tables
  • Worked examples

Who this notebook is for

Students and developers who use Git every day but still fear a bad merge or a lost commit. It explains how Git stores history so the commands make sense.

What you will be able to do

  • Explain how Git stores commits and what branches really are
  • Merge, rebase and resolve conflicts without losing work
  • Undo mistakes safely with reset, revert and the reflog
  • Open a clear pull request and set up a simple GitHub Actions workflow

What's inside

Pick a chapter and the notebook opens right there.

  1. Core ArchitectureDirected Acyclic Graph (DAG), 3 Git States, SHA-1 Content Addressing, Blob StorageStart here
  2. Branching & MergingBranch Pointer Mechanics, Fast-Forward Merges, 3-Way Merge Commits, Diff3 ConflictsStart here
  3. Rebasing & HistoryRebase Mechanics, Interactive Squashing, Linear History, Golden Rule of RebaseStart here
  4. Reset & CheckoutSoft/Mixed/Hard Reset Deep Dive, Git Restore vs Revert, Safe Undo PlaybooksStart here
  5. Stash, Pick & BisectWIP Stash Stack, Surgical Cherry-Pick, Binary Search Bug Hunting with Git BisectStart here
  6. Plumbing InternalsInside.git Directory, Blobs, Trees, Commits, Tags, cat-file, hash-object, PackingStart here
  7. Remotes & SubmodulesRemote-Tracking References, Fetch vs Pull, Submodule Pointers vs Subtree EmbeddingStart here
  8. Config & HooksGlobal & System Configs, Custom Ergonomic Aliases, Client vs Server Pre-Commit HooksStart here
  9. GitHub FoundationsForks, Upstream Tracking, SSH Key Authentication, Issues, Releases, MilestonesStart here
  10. Pull Requests & ReviewHigh-Signal PR Architecture, Squash vs Rebase vs Merge Commit, Branch ProtectionsStart here
  11. GitHub Actions CI/CDYAML Workflow Architecture, Matrix Builds, Caching, OIDC Keyless Cloud DeploymentsStart here
  12. Security & GovernanceSecret Scanning, Dependabot, GPG Cryptographic Signatures, git-filter-repo PurgingStart here
  13. GitHub CLI (gh)Terminal-First Workflows: gh pr create/checkout/merge, gh run view, gh secretStart here
  14. POSIX Shell FoundationsStandard Streams (0, 1, 2), Redirection (2>&1), Pipes, Exit Codes, Signals, SubshellsStart here
  15. Process & Resource Triageps, htop, kill, SIGKILL vs SIGTERM, Inodes (df -i), Disk Usage (du), OOM KillerStart here
  16. Text Processing ToolsGrep vs Ripgrep, Sed In-Place Edits, Awk Columns & Hash Maps, Sort, Uniq, Cut PipelinesStart here
  17. SSH & Network MasterySSH Ed25519, ~/.ssh/config ProxyJump, Curl API Metrics, lsof -i :PORT, Rsync, Zsh/FZFStart here
  18. Top 30 FAANG DrillsObject Plumbing, Force-With-Lease, Reflog Disasters, Inodes, Zombies, Staff RubricStart here

Practice this

Put it to work on LakeBench.

Common questions

Do I need to know Git already?
No. It starts from the three areas a file moves through and builds up to teamwork on GitHub.
Does it include the command line?
Yes. The second half covers shell basics, finding processes and searching text, which you use alongside Git every day.
Can I read a sample before I commit?
Yes. The contents pages and the first pages of every notebook can be read online, so you can judge the style before going further.

More in DevOps and quality

All notebooks