---
title: Record runs in Git
description: Save each run in Git so you can return to the code it used.
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reeval.ai/llms.txt
> Use this file to discover all available pages before exploring further.

Recording copies a run from the `.reeval/runs/` directory into the history folder so it can be committed with the evaluations.

## Record a run

Record the most recent run and commit the history folder:

1. Copy the most recent run from the `.reeval/runs/` directory.

   ```bash
   npx reeval record
   ```

   The command prints the record path and the size:

   ```text
   recorded evals/.history/<run-id>.json + <n> artifact files in evals/.history/<run-id>/ (<kb> KB). Commit it with git.
   ```

2. Stage the history folder.

   ```bash
   git add evals/.history
   ```

3. Commit the history folder.

   ```bash
   git commit -m "Record the latest evaluation run"
   ```

The copy writes a `.gitignore` file in the history folder that un-ignores recorded `*.json`, `*.jsonl`, `*.md`, `*.patch`, and `*.log` files. To record an older run, pass its id. For more information about every flag, see [the `reeval record` command](/reference/cli#reeval-record).

By default, reeval also records each run that finishes in CI. To record every run instead, see [the `record` option](/reference/options#record) and [`with-history`](https://github.com/invertase/reeval/tree/main/examples/with-history). To return to the code a recorded run used, see [the `reeval checkout` command](/reference/cli#reeval-checkout).

## Reference

For more information about what a record holds, see [Record](/reference/glossary#record). For more information about every field, see [Run record](/reference/run-record).

For more information, see [Show one run](/results/output#show-one-run) to print one run, [Compare with past runs](/results/compare/past-runs) to diff two runs, and [Track past runs](/evaluations/recipes/track-past-runs) to follow recorded runs.
