42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
---
|
|
type: challenge
|
|
title: "The Saver"
|
|
xp: 75
|
|
duration: 25
|
|
difficulty: 2
|
|
---
|
|
|
|
# The Saver
|
|
|
|
> **[INCOMING — Mission Control, Earth]**
|
|
>
|
|
> Cadet, snapshots. Git's whole purpose is to capture *commits* —
|
|
> snapshots of your work — that you can return to later.
|
|
>
|
|
> The flow per commit:
|
|
>
|
|
> 1. Create or modify a file
|
|
> 2. `git add <file>` — stage it
|
|
> 3. `git commit -m "<message>"` — lock it in
|
|
>
|
|
> When your script runs, a clean Git repo with identity already set
|
|
> sits in the working directory. Make three commits, in this exact
|
|
> order:
|
|
>
|
|
> 1. Create `a.txt` with `alpha`. Commit message: `add alpha`
|
|
> 2. Create `b.txt` with `beta`. Commit message: `add beta`
|
|
> 3. Create `c.txt` with `gamma`. Commit message: `add gamma`
|
|
>
|
|
> [END TRANSMISSION]
|
|
|
|
## Your Task
|
|
|
|
In `starter/starter.sh`, run six commands per the flow above (one
|
|
echo + add + commit per file).
|
|
|
|
## Objectives
|
|
|
|
- `a.txt`, `b.txt`, `c.txt` exist with `alpha`, `beta`, `gamma`
|
|
- `git log` shows exactly 3 commits
|
|
- Commit messages: `add alpha`, `add beta`, `add gamma` in order
|