Library/Ship It: GitHub and Vercel·Session 1 of 4

Put your project on GitHub (so nothing is ever lost)

25 minSaves $20/mo

Every app your agent builds for you lives on one computer, in one folder, until something happens to that folder: a spilled coffee, a failed drive, a laptop left in a cab. GitHub is the fix. It is a free place to store a full, versioned copy of every project you build, off your machine, with a history of every change. In this lesson you create a GitHub account, get the tool that lets your agent talk to it, and put your first project there for good.

By the end you have a private GitHub repository holding a real project, and a habit you will reuse for every project after it.

What you will use

  • A free GitHub account (github.com)
  • The GitHub CLI (gh), installed by your agent
  • The web app you built in Build the apps you used to buy (your my-apps folder), or any project folder you want backed up
  • Your AI coding agent, signed in and working

Step 1: Understand what GitHub actually does for you

You do not need to think of GitHub as a developer tool. Think of it as a free, versioned backup with a lock on the door. Every time you save a "commit," GitHub keeps that exact snapshot forever, so you can always step back to a version that worked. It is also where two other things happen later: the tickets that track what to build next, and the deploys that put an app online (that is the next lesson, on Vercel). A private repository is visible only to accounts you invite.

Step 2: Create your free account and get the CLI installed

Go to github.com and sign up. It is free, no credit card required. Verify your email address.

The rest of this lesson uses the GitHub CLI (gh), a small command line tool documented at cli.github.com that lets your agent create repositories and push code without touching the GitHub website. Rather than hunt down install steps yourself, open your terminal, start your agent, and say:

"Check whether the GitHub CLI (gh) is installed. If it is not, install it for my [Mac / Windows] machine and tell me when it's done."

The exact command differs by machine and changes over time, so let the agent handle it. Confirm with gh --version.

Step 3: Sign the CLI in to your account

With gh installed, connect it to the account you just made. In your terminal, run:

gh auth login

By default this starts a web-based browser flow: a browser window opens where you approve access, and your login is stored securely on your machine. Follow the prompts: pick "GitHub.com," pick HTTPS, and pick "Login with a web browser." Copy the one-time code shown, paste it into the browser tab that opens, and approve.

Step 4: Put your first project under git and push it

Open the project folder you want to save. Start your agent there and give it this in plain words:

"Put this folder under git and push it to a new private GitHub repository. Do not include any .env files or API keys."

Behind that one sentence, the agent runs four commands you can watch scroll by:

git init
git add .
git commit -m "Initial commit"
gh repo create my-project --private --source=. --push

git init starts tracking history in the folder. git add . stages every file. git commit saves that first snapshot. gh repo create creates the new private repository on GitHub and pushes your code to it, in one step. When it finishes, run gh repo view --web to open the new repo in your browser.

Step 5: Make committing a daily habit

A backup you take once is not much of a backup. After any change that works, tell your agent:

"Commit this with a short message describing what changed, and push it."

Do this after every working change, not just at day's end. If something breaks tomorrow, you have a working version to go back to. To see the full history, open your repository on github.com and click "Commits," or run gh browse from the project folder to jump straight there.

Step 6: Know what never gets committed

Some files should never leave your machine: .env files, API keys, passwords, anything with "secret" or "key" in the name. These belong in a .gitignore file, not in your repository. Ask your agent:

"Add a .gitignore that excludes .env files, node_modules, and any file with 'key' or 'secret' in the name. Then confirm none of those are already committed."

This matters even in a private repo. A repo keeps a full history: if a key gets committed once, it stays in that history even after you delete the file later. The security course covers this in more depth.

You are done when...

You can open github.com, see a private repository holding your project, and your agent can commit and push a new change on command. That is a real, working backup system, not a folder that might vanish with your laptop.

Sources: GitHub CLI manual, gh auth login, gh repo create, gh repo view, gh browse.


Template included: Members get a printable GitHub setup card: the sign-in steps, the exact "put this under git" prompt with its four commands, and the never-commit checklist. Find it in your member dashboard under Templates.

Want it done for you?

Short on time? Alliance Optimal will implement this end to end, wired into your stack, and hand you the keys.

Implementation engagements from $2,500
Next session: Host your website or app free on Vercel (and the alternatives)