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.
10:12
Saved: menu works
11:40
Saved: payment works
12:05
AI broke the form
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
- Account: github.com → Sign up. It’s free, private repositories too.
- 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. - Log in: run
gh auth loginin 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.
- “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. - “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.
- 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
- 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. - 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. - 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