Blog / Build with AI /
GitHub for builders who are not developers
Sooner or later, an AI-built project goes wrong. You ask for one small change and the whole thing stops working. You ask the model to undo it, and it undoes the wrong thing. Now you have no idea what the working version looked like.
GitHub fixes that. It looks like a place for developers, with scary words like “commit” and “branch”, but the idea underneath is simple. It keeps a history of your project so you can always go back.
This guide covers what you need, in plain words, and nothing else.
What GitHub is, in one paragraph
Git is a tool that records snapshots of a folder over time. GitHub is a website that stores those snapshots online. Think of it as “undo” for an entire project, plus a safe copy that lives somewhere other than your laptop.
An analogy: imagine saving a Word document as report-final, report-final-v2, report-final-REALLY-final. Git does the same job, but tidily, with a note on every save and no pile of confusing copies.
The five words you need
You can skip the rest of the vocabulary for now.
| Word | What it means |
|---|---|
| Repository (repo) | The project folder, plus its history |
| Commit | A saved snapshot, with a short message describing it |
| Push | Send your snapshots from your computer to GitHub |
| Pull | Bring the latest snapshots from GitHub down to your computer |
| Branch | A separate line of work, so you can try something without risking the main version |
That is genuinely enough to get value from it.
Why this matters if you build with AI
AI tools change a lot of code quickly. That is useful, and it is also how things get lost. A few ways history saves you:
- You can undo a bad change. If the last AI edit broke the tool, go back to the commit before it.
- You can see what changed. GitHub shows the differences line by line, so “what did the model touch?” has a real answer.
- You have a backup. If your laptop dies, the project doesn’t.
- You can hand the project over. If a developer ever helps you, a repo with a clear history is far easier to work with. More on that in handing an AI-built project to a developer.
- You can show your work. A repository is a simple portfolio.
If you manage websites, the habit will feel familiar. It is the same instinct as taking a backup before a plugin update.
Your first day: a simple routine
Here is a method you can follow. It assumes a project folder on your computer.
1. Create an account and a repository
Sign up at github.com. Click the button to create a new repository, give it a plain name such as bill-splitter, and choose private unless you want the world to see it. Private is the safe default for anything with API keys nearby, and it can always change later.
2. Keep secrets out
Before your first save, decide what must never go online: API keys, passwords, .env files, customer data. Ask your AI tool to create a file called .gitignore that lists them. Git will skip anything named in that file.
This step matters more than any other. Keys pushed to a public repo can be found by bots, sometimes within minutes. If it happens, don’t just delete the file. Treat the key as stolen and replace it with a new one from the provider’s dashboard. I touch on the wider checklist in AI and security: what to check before you ship.
3. Connect the folder
You can do this with a desktop app such as GitHub Desktop, which has buttons instead of commands, or through the code editor you already use, which usually has a source control panel. If you prefer, ask an AI model to walk you through it step by step for your operating system. Tell it you are a beginner and want each step explained.
4. Make your first commit
A commit needs a message. Write it for your future self, in plain words:
- “Add basic layout”
- “Fix total when two people share a bill”
- “Change button colour”
Avoid “update” or “stuff”. In a month, those messages tell you nothing.
5. Push
Push sends your commit to GitHub. Open the repo page in your browser and you should see your files. That is your first backup.
The habit that makes it work
The tool is easy. The habit is what pays off:
Commit before you ask the AI to change anything, and again after the change works.
Two snapshots around every edit. If the AI breaks something, you have a clean point to return to. If it works, you have recorded it. This costs ten seconds and has saved many afternoons.
Small, frequent commits beat huge ones. “Fix the total” is easy to undo. “Changed everything this week” is not.
Branches without the fear
A branch is a safe sandbox. When you want to try something risky, such as a redesign or a big AI refactor, create a branch first, work there, and only merge it back if you like the result. If it goes wrong, delete the branch and the main version is untouched.
You don’t need branches on day one. When you start feeling nervous about a change, that nervousness is your cue to use one.
What to do when something breaks
Say the latest AI edit broke the tool. Your options, from gentlest to strongest:
- Look at the changes. In GitHub Desktop or your editor, see what files changed since your last commit. Often the problem is obvious.
- Discard the changes. Throw away everything since the last commit and start again with a clearer prompt.
- Go back to an earlier commit. Ask an AI model: “Here is my commit history. How do I return my project to the state of this commit without losing the history?” Describe your tool and ask it to explain the risk before you run anything.
Read any command before you run it, especially ones with the word “force” or “reset” in them. They can delete work.
Common myths
“GitHub is only for developers.” It’s for anyone with files that change over time. Writers and designers use it too.
“Public means everyone can edit my project.” No. People can read a public repo, but only people you invite can change it.
“I’ll learn it properly later.” The basics take an afternoon. Learning them after you’ve lost a project is much more painful.
“The AI will remember what it changed.” It won’t. Chat history is not version history. If you work across many chats, a repo is the only record you can trust. A written log also helps, as in keeping a build log while working with AI.
Key takeaways
- Git records snapshots; GitHub stores them online.
- Learn five words: repository, commit, push, pull, branch.
- Keep secrets out with
.gitignoreand treat leaked keys as stolen. - Commit before and after every AI change.
- Use private repositories by default.
Related reading
If you have a project sitting in a folder right now with no history, make today the day. Create the repo, make the first commit and push it. Ten minutes, and you have an undo button.