Git & GitHub Highlights Summary
Every highlight bullet from the 9 pages in this section, gathered on one page and grouped by the page it came from.
- A commit is a full snapshot of the whole repo tree plus a parent pointer - not a diff
- A branch is just a movable pointer to one commit - creating one is nearly free
- A Jupyter notebook's diff noise comes from output cells being part of the tracked snapshot, not from Git itself
- Rebase creates brand-new commits with new hashes - it never edits the originals in place
- status, diff, log, add, commit, push cover daily loops
- stash and restore save context switches without junk commits
- show and blame debug regressions with file history
- fetch and pull --rebase keep feature branches current
- Commit uv.lock and pyproject.toml together on dep changes
- Short-lived feat branches rebased onto main daily
- Squash merge features; cherry-pick hotfixes to release lanes
- Never merge main into release/* - cherry-pick fixes only
- Resolve conflicts with tests and lockfile care
- Protect main with required CI: ruff, pytest, mypy
- Stop, identify conflicted files, and understand both sides before editing
- Regenerate uv.lock - never hand-edit lockfile conflict markers
- Run pytest and ruff after every conflict resolution
- Abort rebase if scope exploded - reset and merge instead
- Ask for help when migrations or shared schemas conflict
- git worktree add creates second directory same repo
- Review PR in worktree while keeping WIP on main checkout
- Each worktree needs its own .venv or uv sync
- Remove worktrees with git worktree remove when done
- Avoid two worktrees running migrations on same local DB
- gh pr create links commits to tickets and templates
- gh run watch streams CI without browser tab
- gh api for scripted org automation
- Authenticate with gh auth login SSH or HTTPS
- Same uv/pytest commands locally as GitHub Actions
- nbstripout strips outputs before commit - diffs stay reviewable
- Git LFS for parquet, checkpoints, and large CSV artifacts
- Never commit raw datasets with PII - use DVC or cloud URIs
- Jupytext pairs .ipynb with .py for cleaner PRs
- pre-commit hooks enforce strip and file size limits
- user.name and user.email required for auditable commits
- pull.rebase preserves linear history on feature branches
- pre-commit runs ruff and nbstripout before commit
- aliases shorten log, checkout, and sync workflows
- Signed commits when org policy mandates
- main stays shippable with green ruff and pytest
- Commit uv.lock with every dependency change
- Ticket IDs in commits for cherry-pick traceability
- Never force-push shared branches
- pre-commit mirrors CI scripts exactly
49454e4f4d5f434e4f5904434556494d43451d1e1a56181a181c1a1d
Reviewed by Chris St. John·Last updated Jul 31, 2026