Free guide

Git and GitHub for beginners, like a game save: three sentences for Claude Code

No Git commands by hand: Claude Code does everything, and all you need are sentences. Git works like saving in a game: if you break the project, you go back to yesterday.

  • 5
    min read
  • Checked

  • From an Instagram video
Sample
  1. 10:12

    Saved: menu works

  2. 11:40

    Saved: payment works

  3. 12:05

    AI broke the form

  4. 12:06

    Back to the 11:40 version

In short

GitHub is a project folder in the cloud that remembers every version. One project on GitHub is called a repository, and private repositories are free. Services for publishing a website (Vercel, Railway) take the code from there, not from your laptop.

Do it once: an account and access for Claude Code

  1. Account: github.com → Sign up. It’s free, private repositories too.
  2. Install the GitHub CLI, GitHub’s tool for the terminal. Through it, Claude Code creates repositories on its own. Mac: brew install gh. Windows: winget install --id GitHub.cli --source winget.
  3. Log in: run gh auth login in the terminal, and a browser opens where you confirm the login. Nothing else by hand after that.

Three sentences that get Claude Code saving versions on its own

The sentences work in Claude Code and in any other AI that works directly in your project folder.

  1. “Upload this project to GitHub in a private repository.” Claude creates .gitignore (the list of files that don’t belong on GitHub), saves the first version, creates the repository, uploads the code and sends you the link. Once, at the start.
  2. “Save the current version to GitHub and describe what changed.” It saves the version with a clear description and uploads it to GitHub. After every step that works. In Git, a save like this is called a commit.
  3. Write in CLAUDE.md: “After every working step, save a version to GitHub and write what changed.” Then it usually does this on its own, without reminders.

Where to publish your app for free and when you can’t

  1. Vercel (websites): vercel.com/new → connect GitHub → choose the repository → Deploy. Every version you then save to GitHub gets published automatically. But the free Hobby plan is only for personal, non-commercial projects: a business website belongs on a paid plan.
  2. Railway (bots, servers, databases): railway.com → New Project → GitHub repo → choose the repository → Deploy Now. You enter keys and passwords in the service settings on the Variables tab, not in the code. At the start you get a trial credit, after that a small free monthly credit remains, and for more traffic there’s a paid plan.
  3. GitHub Pages (static websites made of HTML, CSS and JavaScript): in the repository, Settings → Pages → Deploy from a branch → choose the branch → Save. On a free account, it works only from a public repository, so anyone can see the code. GitHub Pages isn’t meant for running a business or an online store.

A sentence for Claude before you publish:

Prepare the project for deployment to Vercel (or Railway): what to change in the settings and which environment variables to set.

Keys and passwords don’t belong in the repository

Never put API keys, bot tokens or database passwords in the repository, and not the .env file either. The exception is a project from Lovable: there, .env holds only public values and has to be saved. Has a key already leaked? First revoke it and issue a new one, and only then clean up the history.

A check in one sentence:

Check the repository: are there any keys, passwords or a .env file with secret values in it, even in old versions? If so, list the keys I need to revoke and wait until I’ve done it. Only then remove them from the history and add them to .gitignore.

Stuck on publishing your app?

In a free 30-minute call, we’ll go through where your project is kept and suggest how to save it safely and where to publish it.

How we check a system that’s already built

Free estimate

In 30 minutes, you’ll know where to start and roughly what it will cost.

  1. Topic
  2. Company
  3. Contact
What do you need help with?

Tell us about your company
How many people work at your company? (optional)
Where is your company based? (optional)
How did you hear about us? (optional)
Where can we reach you?
How should we contact you

Add a note (optional)

Within one business day, we’ll get back to you and arrange a time.