# M03-L02 — Push, clone, and reproduce

**Outcome:** Synchronize intended history and reproduce the baseline from a second checkout.

**Start:** M03-L01; correct private remote, local commits, and CP01 toolchain.

Push transfers commits and requests a remote reference update. Fetch retrieves remote objects and updates local knowledge without integrating into your current branch. Pull includes integration; this course uses `--ff-only` where only a simple advance is intended. [git push](https://git-scm.com/docs/git-push), [git fetch](https://git-scm.com/docs/git-fetch), [git pull](https://git-scm.com/docs/git-pull)

From the reviewed practice repository, run `git push -u origin main`, inspect the actual result, then fetch and inspect status/history. Open the hosted files and compare the latest commit with `git rev-parse HEAD`. This verifies the intended destination instead of relying on a successful-looking message beside the wrong browser tab.

Clone the verified URL from the parent learning directory into a new `sensor-monitor-repro` folder. Do not reuse or delete an existing folder containing work. Enter the clone, inspect its location, status, and commit, then follow only its README:

```powershell
.\scripts\replay.cmd
.\scripts\build-firmware.cmd
```

At CP01, replay prints a fixed synthetic source-reading baseline; the fixture parser and automated assertions arrive later. Record actual replay and build results without inventing tests absent from this checkpoint. A second checkout on the same computer reuses installed dependencies, so it checks tracked source/instructions in that environment, not a completely fresh machine.

If a push is rejected because the remote is ahead, fetch and inspect the graph before integration. If the clone lacks a required source file, add it deliberately to the original project and repeat the affected reproduction. If a dependency is missing, correct the setup record rather than copying installed binaries into source history.

![Push sends commits to the remote; fetch retrieves remote knowledge without integration; clone creates a separate checkout for reproduction.](../../../../book/figures/D06.png)

*D06. Push sends commits to the remote; fetch retrieves remote knowledge without integration; clone creates a separate checkout for reproduction.*

## Practice and completion

Complete the [exercise](exercise.md), then compare your artifact with the separately distributed instructor answer. A lesson acknowledgment records your own progress; it does not certify that a physical test occurred.

## Reading and figures

[Chapter 6](../../../../book/chapters/ch06/chapter.md). Resources: [Project checkpoint guide](../../../../examples/sensor-monitor/docs/checkpoints.md) and [toolchain setup](../../../../examples/sensor-monitor/docs/setup.md). Figure references: SS06-03–06; D06. 
