Builders Camp

Tools

GitHub for non developers vibe coding version control explained

You need five GitHub ideas to vibe code safely: a repository holds your project and its history, a commit is one saved change, a branch is a safe copy to experiment on, a pull request asks to merge that copy back, and a revert undoes a change by adding a new commit. Learn those, keep keys out of the repository with a .gitignore file, and a bad AI change becomes a quick rollback instead of a lost weekend.

When an AI agent rewrites twenty files to fix one button, version control is how you get yesterday's working app back. GitHub's About Git page describes a community of 100 million developers using the same system, and its promise to them is the one you need: with version control, "any earlier version of the project can be recovered at any time." You do not have to become a developer to get that safety net. You have to understand five words and set up two habits.

The About Git page also explains a commit in one line: "In short, a commit functions like taking a photo." Everything below builds on that picture. If your project is a photo album, a repository is the album, a commit is a photo, a branch is a second album you can scribble in, and a revert is a new photo that puts things back the way they were.

What do repository, commit, branch, pull request and merge mean?

GitHub's own docs define all five terms in plain language, and none of them requires writing code.

Term What GitHub's docs say it is When you meet it as a vibe coder
Repository A place to store code, files and each file's revision history When you connect your builder to GitHub and a new repo appears
Commit A record of changes to one or more files, with a unique ID Every time your AI tool saves a change to the repo
Branch A parallel version of your code that does not affect the main branch When you want to try a big change without risking the working app
Pull request A request to merge changes from one branch into another When an agent or a developer proposes a change for you to review
Merge Taking the changes from one branch and applying them to another When you accept a pull request

The About repositories page puts it simply: "A repository is the most basic element of GitHub. It's a place where you can store your code, your files, and each file's revision history." That last part, the revision history, is what you are really paying attention to.

GitHub's commits reference says "Similar to saving a file that's been edited, a commit records changes to one or more files in your branch." Git gives each commit a unique ID and records what changed, when, and who made the change, which is how you can later point at one exact moment and go back to it.

Why does a vibe coder need GitHub at all?

You need GitHub because AI agents make large changes quickly, and a large change you did not read is a large change you cannot undo by memory. One prompt can touch layouts, data logic and styling at once. Without a history, the only way back is to prompt the AI to reverse itself, which often stacks a second broken change on the first.

GitHub also gives you a copy of your code that lives outside the builder. Lovable's GitHub integration docs say you can sync a project to GitHub to "back up your code, review changes in pull requests, work locally in your IDE, test features on branches, and deploy outside Lovable." When a developer joins later, or you move the project to another tool, the history comes with it.

The cost to start is low. The About repositories page states that GitHub Free covers unlimited private repositories with a limited feature set, and for one person's side project that limit rarely matters.

How do branches keep an AI agent from breaking your working app?

A branch lets the agent work on a copy while the version your users see stays untouched. GitHub's branches reference says "Branches let you develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository." GitHub names the default branch main in any new repository, and unless you choose otherwise, main is the base for new pull requests.

Use a branch whenever a change is big enough that you would be upset to lose a day undoing it: a redesign, a new data model, a new payment flow, or any prompt that starts with "refactor." Small copy fixes can go straight to main.

Lovable supports this directly. Its GitHub integration docs state that "Lovable only edits and syncs one branch at a time", and you can create a new branch from the branch picker in the project's GitHub settings. Watch one detail the docs call out: Lovable creates the new branch from the branch you are currently on, not from main, so switch to main first if you want a clean starting point.

What happens in a pull request, and who should merge it?

A pull request is where a proposed change waits for a yes or a no. The glossary on GitHub's About repositories page defines it as "A request to merge changes from one branch into another."

GitHub's pull requests reference lists what you see inside one: the description and comments, the commits, automated checks, and a Files changed tab with the diff.

As a non-developer you do not need to read every line of the diff. You need to check three things before you click merge:

  • The file list matches the request. If you asked for a new button and the Files changed tab shows your database setup, stop and ask why.
  • The checks pass. A red check on the Checks tab means an automated test or build failed.
  • You tried it. Open the preview of the branch, if your host gives one, and click through the change yourself.

You should merge your own pull requests on a solo project, and a reviewer should merge them on a team. If an agent such as Codex or Claude Code opens pull requests for you, reviewing Codex pull requests covers how to check one in three passes.

How do you roll back a bad AI change? A worked example

Rolling back means adding a new change that undoes the bad one, not deleting history. GitHub's Desktop revert docs state it directly: "When you revert to a previous commit, the revert is also a commit. The original commit also remains in the repository's history." Here is how that plays out for a hypothetical product manager, Maya, who has a Lovable app synced to GitHub.

Maya asks the AI to "add dark mode." It works on the settings page, but the sign-up form now submits blank entries and the pricing page lost its layout. She tries one more prompt to fix it, and the form breaks in a new way. Here is what she should do instead.

  1. Stop prompting. Every extra fix attempt adds another change to untangle. Write down what broke and when it last worked.
  2. Find the last good version. In Lovable, she opens the History panel. On GitHub, she opens the repository's commit history, where every commit carries the message that describes it. She picks the last one from before "add dark mode."
  3. Pick the undo tool that matches where the change landed. The change came from a Lovable prompt, so she uses Lovable's own revert (see the table below). If an agent had delivered it as a merged pull request on GitHub, she would use the Revert button on that pull request instead.
  4. Check the data, not just the screens. Any blank sign-ups the broken form created are rows in her database, and a code rollback does not remove them.
  5. Redo the change smaller, on a branch. She creates a branch called dark-mode, asks for dark mode on one page at a time, and merges only when the sign-up form still works.

Lovable's version history docs describe the feature in one line, "Version history is your safety net", and warn plainly about the data check: reverting "does not restore or roll back your database data". The same is true of any Git revert. Git versions the files in your repository; the rows in your database are not in it.

Where the bad change landed Undo tool What it does
A Lovable prompt History panel, then Revert Restores the project's code to that version
A merged pull request on GitHub Revert button near the bottom of the pull request Opens a new pull request that undoes the merge, which you then merge
A commit made on your own computer GitHub Desktop, History, right-click, Revert Changes in Commit Adds a commit that removes that commit's changes

GitHub's pull request revert docs confirm the second row: "Reverting a merged pull request creates a new pull request that reverts the original merge commit." You need write permission on the repository to see the Revert button. Once the rollback is merged, check that your live site has redeployed from the new commit before you tell anyone it is fixed. Deploying an AI-built app for the first time covers how your host picks up new commits.

What should never go into a repository?

API keys, passwords and any other secret should never be committed, because a commit is permanent history and anyone with access to the repository can read every past version. The usual culprit is a .env file, where builders and agents keep keys such as your Stripe or OpenAI secret key.

A .gitignore file is the list of files Git should skip. GitHub's Ignoring files page says you can create one in the repository's root directory "to tell Git which files and directories to ignore when you make a commit." The same page warns about the trap most people fall into: "If you want to ignore a file that is already checked in, you must untrack the file before you add a rule to ignore it." Adding .env to .gitignore after it was committed does nothing for the copies already in history.

GitHub adds two safety checks. Its push protection for user accounts is on by default and "Stops you from pushing secrets to public repositories on GitHub". Secret scanning runs automatically for free on public repositories and scans the whole Git history; when it raises an alert, GitHub's advice is to "rotate the affected credential immediately to prevent unauthorized access." Treat both as a backstop, not a substitute: push protection for users covers public repositories, and Lovable creates the repositories it syncs to as private by default.

If a key does slip in, GitHub's sensitive data guide says that as a first step "you need to revoke and/or rotate that secret." Rewriting history to scrub it out is a harder job with side effects for everyone who has a copy, and often unnecessary once the old key no longer works. The vibe coding security checklist lists the other places keys leak, including the browser bundle.

Do you still need GitHub if your builder has its own version history?

You can get by without it for a solo prototype that lives entirely inside one builder. Lovable saves every change as a version automatically, and its revert covers the most common disaster, a prompt that broke the app. For a weekend project nobody else touches, that is a reasonable place to stop.

GitHub earns its place in three situations. First, when a second tool or a person edits the code, because a Git history records every commit and who made it, whichever tool made it. Second, when you want a copy that survives leaving the builder. Third, when you need to go far back: Lovable's history docs note that very old versions can be previewed but no longer restored, while a Git repository keeps its commits unless someone deliberately rewrites its history.

The habits that make either history useful are the same: one feature per prompt, a clear note of what each change was for, and a stop before stacking fixes. Vibe coding mistakes to avoid covers those habits in more detail, and Lovable for product managers covers where GitHub sync fits in a Lovable workflow.

Where can you practise this on a real project?

The Building with Lovable bootcamp is a 2-week Builders Camp programme with 3 live sessions, led by programme director Ricardo Luiz and aimed at non-technical professionals. Its syllabus names Lovable, Supabase and GitHub among its tools, and it takes you from idea to an interactive full-stack prototype connected to a real backend, with no code required. It sits in the Vibe Coding Expert Track alongside other bootcamps on shipping products with AI-assisted building tools.

Bootcamps referred in this Guide

Frequently asked questions

Do I need to learn the command line to use GitHub?

No. A non-developer can do most of what this guide covers through the GitHub website, GitHub Desktop, or a builder such as Lovable that syncs to GitHub for you. The command line becomes useful once you work locally in a code editor, but it is not a prerequisite for keeping a history and rolling back.

What is the difference between Git and GitHub?

Git is the version control system that records the history of your files. GitHub is a service that hosts Git repositories online and adds pull requests, code review and security features on top. Your history is Git's work; the website where you browse it and review changes is GitHub.

Is reverting the same as deleting a commit?

No. A revert adds a new commit that undoes an earlier one, and GitHub's Desktop documentation states that the original commit remains in the repository's history. Nothing is erased, which is why reverting is the safe default for a non-developer: you can always revert the revert.

Will rolling back my code also roll back my database?

No. Git versions the files in your repository, and the rows in your database are not files in the repository. Lovable's version history docs say the same of its own revert: it restores code only and does not roll back database data. Undo data changes separately, from a backup or by hand.

Should my repository be public or private?

Private, unless you have a reason to publish the code. GitHub states that public repositories are accessible to everyone on the internet. Lovable creates the repository it syncs to as private by default, so check the visibility before you change it.

What should go in a .gitignore file for a vibe coded app?

At minimum, any environment file that holds keys (such as .env), plus generated folders such as node_modules and build output. GitHub keeps a public repository of recommended .gitignore templates per language and framework that you can start from.

I committed an API key by accident. Is deleting the file enough?

No. The key stays in earlier commits. Rotate the key at the provider first, which is the first step GitHub's sensitive data guide gives, then remove it from the code, untrack the file and add it to .gitignore. Rewriting history is a further, harder step that is often unnecessary once the key is revoked.

Sources

Written by

Andre Albuquerque

Andre Albuquerque

CEO of Builders Camp, SuperOperator, and other companies. Building products.

CEO of Builders Camp, SuperOperator, and other companies. Building products.

LinkedInMore guides by Andre Albuquerque
Ricardo Luiz

Ricardo Luiz

He is an accomplished Product Director, bringing a wealth of experience in driving innovation, building high-performing teams, and fostering collaborative environments.

He is an accomplished Product Director, bringing a wealth of experience in driving innovation, building high-performing teams, and fostering collaborative environments.

LinkedInMore guides by Ricardo Luiz

Last updated 2026-10-19

Researched from Builders Camp's bootcamp, track and masterclass material and the sources listed on this page, drafted with AI, and fact-checked against every source cited.

Vibe coding mistakes to avoid, and the fix for each

The costly vibe coding mistakes are product mistakes, not coding ones: building before you know the problem, letting...

Andre Albuquerque & Gonçalo Soares
Read more

How to deploy an AI built web app for the first time: hosting, environment variables and a production checklist

Pick the host by what your app is, not by brand: a front end that talks to a hosted database deploys as a static site...

Andre Albuquerque & Gonçalo Soares
Read more

Vibe coding security checklist before launch, written for product people

Do not put a vibe coded app in front of real users until ten checks pass, and the first four decide most outcomes: row...

Andre Albuquerque +2
Read more

Lovable for product managers: what it is good for and where it stops

Lovable is good for three PM jobs: clickable prototypes that answer whether to build something, small internal tools...

Andre Albuquerque & Ricardo Luiz
Read more

How to review Codex pull requests: evidence, scope and the merge decision

Review a Codex pull request in three passes: check the evidence the description carries, compare the description's file...

Andre Albuquerque & Guilherme Salgueiro
Read more

How to debug AI generated code when you are not an engineer

Debug AI generated code with a fixed loop: reproduce the bug on purpose, read the full error, ask the AI to explain...

Andre Albuquerque & Gonçalo Soares
Read more

Export Lovable project to GitHub and continue in Cursor

Connect the Lovable project to GitHub, clone the new repository, open the folder in Cursor, do your work on a feature...

Andre Albuquerque +2
Read more
See the Building with Lovable bootcamp