How to use this book
We begin with a short orientation, briefer than the boot camp’s because the reader arrives already knowing the cadence and conventions.
The daily cadence
Each day has the same shape as the boot camp:
- Lecture content (~1 hour). Read the chapter, running each command in your own terminal on a scratch repository as you encounter it. The history-altering operations of Days 2 and 3 are learned only by performing them.
- Homework (~2 hours). Problems with worked solutions at the end of the chapter. Attempt each before checking the solution.
Three consecutive days complete the bridge.
A note on danger
The boot camp’s operations were almost all additive: a new commit, a new branch, a merge. They rarely destroyed anything. This bridge is different. Several of its operations rewrite history (Day 2) or can discard uncommitted work (Day 1), and one exists precisely to recover from disaster (Day 3).
Two habits make this safe:
- Work on a scratch repository while learning. Do not practice interactive rebase for the first time on a project you care about. Create a throwaway repository, as the homework directs, and experiment there.
- Learn the reflog early. Day 3 covers
git reflog, the log of everywhereHEADhas been. It is the safety net beneath nearly every operation in this book: almost anything that is committed can be recovered through it. The single exception, uncommitted work destroyed bygit reset --hardorgit restore, is flagged wherever it arises.
If an operation in this book frightens you, commit your work first. A clean working tree with everything committed is recoverable through the reflog no matter how badly a subsequent rewrite goes. The danger is almost always in uncommitted changes, not in committed history.
A running example
The worked examples follow a single project across the three days: trial-analysis, an R analysis repository for a hypothetical randomized trial of a glucose-lowering agent, with a primary endpoint of twelve-week change in HbA1c. The repository begins Day 1 in the state a boot-camp graduate would leave it: a working analysis.R, a clean history on main, and the everyday workflow already in hand. Each day develops it further.
Conventions
The visual cues are described on the Conventions page and are identical to the boot camp. In brief: commands you type follow a $ prompt; output has no prompt; placeholders you replace are written in <angle-brackets>; interactive-tool prompts are shown inline.
Companion volumes
This bridge sits between the boot camp and the Practicum:
- Git and GitHub for Biostatistics (the prerequisite), https://git-bootcamp.rgtlab.org
- R for Biostatistics (the parallel R boot camp), https://r-bootcamp.rgtlab.org
- Biostatistics Practicum (what comes next), https://rgtlab.org/practicum
The end of Day 3 describes how the Practicum extends the skills of this bridge into a full reproducible pipeline.