Grok Build · 50 min

What a repo is

Open Grok Build docs
  • Use the word repository for a folder plus history — not a website and not a GitHub login
  • Install Git from official git-scm if it is missing, then git init, first commit, and git status in a scratch project
  • Open Grok Build in that directory and keep a real repository on disk

Why this matters

A folder is a pile of files. You already have those. A repository is that pile plus a history: what changed, when, and the last good snapshot you meant to keep. People shorten it to repo. They also use the word for a website. That second use is how this lesson gets confusing.

GitHub is a company website that can host a copy of a repository. It is useful later. It is not the thing. You do not need a GitHub account for this module. You do not need to “put it on the internet.” You need Git on your machine, one scratch project, one commit, and git status that you ran yourself.

Pathway C’s standard is a change in a repository. You cannot meet that standard if “repo” still means a login page. This module makes the word honest. Then you open Grok Build in that directory so the agent is standing in a real repo, not a random folder.

Teach

Folder versus repository

Open a folder in File Explorer or Finder. You see files. That is a folder.

A repository is the same folder after Git has started keeping history. Git writes a hidden .git directory inside it. You still open the folder the same way. The extra fact is: you can ask “what changed since the last snapshot?” and get an answer.

WordWhat it isWhat it is not
Folder (directory)Files in a place on diskHistory. Undo. A website.
Repository (repo)That folder plus Git’s historyA GitHub account. A URL. A programming language.
GitThe program on your computer that records snapshotsThe website. The company.
GitHubA website that can store a copy of a repositoryRequired for a repository to exist

You can have a perfectly real repository that never leaves your laptop. That is the goal today.

If you say “I put it in the repo” and you mean “I saved a Word file in Documents,” you used the wrong word. If you say “I need a GitHub before I can have a repo,” you have the dependency backwards.

Official Git, if you do not have it

In a new terminal:

git --version

If you get a version line, you are done installing Git. Skip to the scratch project.

If the command is not found, install Git from the official site: git-scm.com/downloads. Choose your operating system on that page.

On Windows, that page sends you to the Git for Windows installer (git-scm.com/install/windows). Run the official installer. Accept the defaults if you are unsure; they include Git on your PATH so PowerShell can see git. Close the terminal. Open a new one. Run git --version again.

The official Windows page also lists winget install --id Git.Git -e --source winget. Either path is fine if it came from git-scm. Do not download a random portable zip from a forum, a video description, or a “free software” mirror.

On a Mac or Linux, use the download page for that system. Do not invent an install URL that is not on git-scm.

After Git is on PATH, set a name and email if git commit later complains that they are missing. This is local identity on this computer, not a GitHub login:

git config --global user.name "Your name"
git config --global user.email "[email protected]"

Use a name you are willing to see on your own snapshots. The email can be a real address you own. It does not have to be a GitHub address.

Make a scratch project, then one commit

Do not run git init in Documents, Desktop, your home folder, this LMS, or a client tree. You would be asking Git to watch a junk drawer.

Use a dedicated scratch folder. If you still have the C0a folder (Documents\grok-scratch with a letter and a price list), you may turn that folder into the repository — or copy those files into a new folder first if you want a clean start. Either way, the files are yours: letters, a price list, a meeting note. Not application source.

PowerShell example:

New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\Documents\grok-scratch" | Out-Null
Set-Location "$env:USERPROFILE\Documents\grok-scratch"
# Copy or keep your own .txt files here, then:
git init
git status
git add .
git commit -m "first snapshot of my scratch files"
git status

On macOS or Linux: mkdir -p ~/Documents/grok-scratch, cd there, same Git commands.

What you just did, in plain language:

  1. git init — turn this folder into a repository. History starts here. Nothing is uploaded.
  2. git status — ask Git what it sees. Before the commit: new files, not yet snapshotted. After a clean commit: nothing to commit, working tree clean.
  3. git add . — mark the files in this folder for the next snapshot. Only do this in the scratch folder.
  4. git commit — take the snapshot. The message is a note to future you.

If git status after the commit still lists files, you missed an add, or a file is being ignored. Fix that in this folder before you call it done.

Grok Build may explain any of those commands. Ask it in the TUI after you launch, or on grok.com if you are stuck on a sentence. You still type git init, git add, and git commit in your own shell — or you watch the exact command and approve it only if it is those commands, in this folder. A paragraph from the model is not a repository. git status on your disk is.

Open Grok Build in that directory

From the scratch repository:

grok

Or grok --cwd pointed at that folder. Same rule as C0a: the working directory is the repo root.

Send a read-only prompt. Ask what this directory is, whether it is a repository, and what git status says. Tell it not to edit and not to commit. If it offers to “connect GitHub,” add a remote, or rewrite your letters into an app, refuse.

You now have the two facts this pathway needs: a real repository on disk, and Grok Build standing in it.

Worked example

Same shop owner as C0a. She already has Documents\grok-scratch with prices-spring.txt and vendor-letter.txt. Grok Build is already on her PATH.

  1. New PowerShell tab. git --version. If missing, she installs from git-scm.com/downloads, closes the tab, opens another, checks again.
  2. Set-Location "$env:USERPROFILE\Documents\grok-scratch".
  3. She asks Grok, if she wants, “Explain git init in two sentences. Do not run it.” Then she runs:
git init
git status
git add .
git commit -m "first snapshot of my scratch files"
git status
  1. The second git status says the working tree is clean (or the equivalent on her Git version). She copies that output.
  2. She runs grok in the same folder. She sends:
Is this folder a git repository? What files are here? Show git status. Do not edit. Do not commit. Do not add a remote.
  1. She refuses any write. /quit.

She can now say, correctly: “This folder is a repository because Git is keeping history in it. GitHub is not involved.”

Your turn

Do c0b-l01-e1 in a real folder on your machine, then in Grok Build. You will install Git only if needed, take a first commit in a scratch project of your files, paste git status after that commit, and use the word repository for the folder-plus-history — not for a website.

If Grok offers to create a GitHub repo, open a pull request, or git push, say no.

Common failure

You ran git init in Documents or your home folder. Stop. Do not git add . there. Delete the extra .git folder only if you are sure you created it just now and that directory was not already a repo you care about. Start over in a dedicated scratch folder.

You thought you needed a GitHub account. You do not. A repository exists after git init and a commit on your disk. The What’s next note is the first time GitHub is allowed to come up.

You used “repository” for the website. In the artifact, the word has to mean folder plus history. “I made a GitHub” is a fail even if the sentence is confident.

You only asked Grok to explain Git. The artifact is git status after a commit you made. A definition is not a repo.

You launched Grok Build in a different folder than the one you initialized. /quit. cd to the scratch repository. The agent’s working directory is the desk.

What’s next

GitHub is a hosted copy of a repository, with accounts and remotes, if you ever want one. It is optional. You can finish the rest of repo-level Pathway C (through C4) without it.

C1 is the TUI in more depth: auth options, sessions, /doctor. If C0a already installed Grok Build, you are not hunting a second installer. You are proving you can live in the terminal on purpose. Bring the scratch repository. You will keep using it.

Your turn

Grok Build

First local repository

Do this on grok-build. There is no paste-in prompt for this one — follow the lesson, then paste the artifact below.

Artifact

From a real folder on your machine, then Grok Build: 1. One sentence that uses the word repository correctly (folder plus history on your disk — not a website, not a GitHub account). 2. The exact `git status` output after your first commit in the scratch project (working tree clean, or the equivalent). 3. Proof you opened Grok Build in that same directory (path the TUI saw, or the read-only answer that named the folder). Confirmation you did not add a GitHub remote or push.

Read the lesson if you want. Submitting an artifact and marking complete needs a seat.