--- type: battle title: "First Repo" xp: 200 duration: 30 difficulty: 1 --- # First Repo > **[INCOMING — Mission Control, Earth]** > > Cadets, your first paired exercise. One of you will set up a fresh > Git project; the other will verify it. Then swap. > > Pair up. Decide who goes first as **defender** and who goes first > as **attacker**. > > [END TRANSMISSION] ## The Task The **defender** writes a single shell script — `setup.sh` — that, when run inside an empty workspace: 1. Initializes a fresh Git repo on branch `main`. 2. Sets `user.name` and `user.email` on the repo. 3. Creates a file called `hello-world.txt` containing exactly: ``` Hello, World ``` 4. Stages and commits it with the message `add hello-world`. ## Battle Rules - **Defender**: writes `setup.sh` in a clean workspace. Does not show the file until done. - **Attacker**: receives the script, runs it in a clean folder, inspects the resulting repo, and submits a review. - **Then swap**: roles flip; the new defender writes their own `setup.sh` (no copy-pasting). - Both pass the battle if both scripts pass review. ## Tools `git init`, `git config`, `echo`, `>`, `git add`, `git commit -m`.