Home/ Curriculum/ Day 5
DAY 05 of 12

History & packaging

Time-machine your code and pin your dependencies so it runs anywhere

You can do… by end of day
  • Commit with git status → add → commit, undo at every level, and work with branches.
  • Merge a branch and resolve a simple conflict.
  • Isolate a project in a venv and handle errors cleanly.
  • Install and pin software with apt/pip so the same build runs on any machine.
Deliverable

A git repo with a clean, readable history + a venv that reproduces the project anywhere.

Big-picture hook

Your code now has a history, and your dependencies are reproducible. Time to box the whole stack and put a real door in front of it.

Concepts what you'll understand
  • Git, the time machine: the working tree, the index, commits; status → add → commit; reading git log.
  • Branches & merge: why a branch, merging, and the (non-scary) conflict.
  • Levels of undo: git restore, git reset --soft/--mixed/--hard, and recovering a “lost” commit.
  • venv & packaging: a virtual environment per project; pip install -r requirements.txt; why you pin.
  • Package managers as an app store: apt (system), pip (Python) — and how an install actually works.
  • Clean Python: modules, error handling (try/except), and the patterns for tidy Flask code.
The lab hands-on, ends with something live
  1. First commit: init a repo, make a meaningful commit, read the log.
  2. Undo lab: make a mess, then undo it at every level until the history is clean.
  3. Branch & merge: create a branch, commit to it, merge back, and resolve one conflict.
  4. Venv + pin: create a venv, add a dependency, pin it to requirements.txt, and rebuild from scratch.
Want this in another format? All formats