So You Want to Build AI-Generated Apps And You Know Absolutely Jack about Computer Science? (vol. 3)
Untangle failed codebases with this one weird trick
3d visualization of Git commit history of Godot Engine source
I hate to deliver the bad news, but I’ll just give it to you straight:
If you are building software, whether you are a vibecoder who started today and can’t read a single line of code or an elite h4x0r
, you are going to have to know some amount of version control.
First step: don’t be intimidated by the jargon. While the iceberg goes very deep, as a beginner there’s only a handful of concepts you need to learn which I’ll cover here. Forget the rest of the iceberg.
Repository - where your code lives
Commit - checkpoint you can return to while working on code
Push - finalizing and backing up your checkpoints
Discard - return to the last checkpoint of your code.
Simple!
Github lets you make & manage checkpoints
If you have already tried vibecoding an app, this has certainly happened to you:
prompt:
“Ok, this is looking great, we are almost there! just add the email signup form to the bottom of this page, thats the last thing i need!”
The agent proceeds to delete half of the work you had finalized, and place a broken email signup form on the page, which is now loaded with 10 errors in your browser. As you try to get it to fix the errors and replace the pieces of your app it just deleted, you quickly enter the death spiral where you codebase is unrecoverable and you need to start over.
You are about to ragequit.
Listen, you need to go into this expecting that’s going to happen, and be prepared with the right tools to handle that. How many revisions do you think your favorite author’s book went through with their editor before it went to publishing? 4, 5, a dozen+ rounds of revision are normal.
Each version of the book the author submitted is similar to a commit of your app. While the author and editor may have managed their version control with 100 emails and FinalManuscriptIReallyMeanItThisTime(v7).docx
attachments, you will manage your software versions with Github1
Sign up for a free github account, and start a new repository through the interface. Repository just means “place where your code lives.”
When you go onto youtube or whatever to learn about starting to use Github, nerds are going to love to flex on you and insist you have to learn terminal commands. Scary, I know. They’re wrong. I promise you can be very proficient with basic Github operations without ever having to run a single terminal command. Their official app, Github Desktop is the easiest way. Download it.
Commits
Conceptually what you are going to do is every time you have achieved a working check-in point with your app– a page that’s mostly working and has no errors, a successfully inserted email signup form– you will commit to Github.
A commit goes on the permanent record in the story of this app being built. At any time in the future you will be able to return to this version of your app when something goes wrong. Commits are known-good working checkpoints, not necessarily finished or bug-free complete apps.
Once you’ve hooked up your Github repository to your local project folder through Github desktop, whenever you want to make a commit as a checkpoint, just type a summary message of what changes this checkpoint has, and click commit in Github Desktop.
Your first commit, you are a real engineer now!
Push It
Commits only exist on your local computer at first. Every so often, either after every commit or after a collection of commits that make up an entire finished feature, you will want to push those commits to github. This is just sending the code to the cloud storage on github so that if your computer explodes tonight you won’t lose all your coding work (and later, so you can work on teams). When you have a number of commits that you feel good about, just hit the push button in Github Desktop.
Discard It
Theres just one more operation you need to be a successful beginning vibecoder: discarding changes.
when the agent completely did the wrong thing and blew up your app (it will), since you made a commit checkpoint right before the agent did that, all you have to do is drop all the changes since your last checkpoint commit. To do this, just open github, ctrl+A to select all the changed files, right click and choose “discard edits”.
Now try that feature again with a new prompting approach with your agent and see if you can get it to build your next step without blowing up your app this time.
For anything but minor errors, I suggest you don’t even try to have an agent fix it’s big mistakes. Just discard the changes and try again. Blow it up as many times as you want, eventually you’ll make progress, and you will commit that progress as a checkpoint.
Build It
That wasn’t so bad right?
You should now be able to:
commit your changes when the agent built something right
discard your changes when the agent did something wrong
backup your code on Github by pushing.
Plus you’ve learned a few words that programmer nerds will respect you for when you start dropping them in meetings.
Ship it
If you actually manage to make a working, finished app, at some point you are going to be ready to deploy it into the world. My recommendation is don’t attempt this if you are a beginner at this stage, just hand off your finished repository to some nerds and get them to deploy it. Deployment is an entirely separate iceberg of it’s own from version control, and it goes much, much deeper. If you do want to learn about that, your next step might be learning the basic concepts of CI/CD.
Extra Credit - Next Steps.
What I’ve shared here is just the bare fundamentals you need as a solo noob. If you start building on a team or working with legit devs you are going to need to take it to the next level and learn branching and merging. Follow the Github Flow technique to make things easy on yourself and your team.
Extra Extra Credit: Automate version control through AI chat.
While I’ve been using Github for 15+ years and know loads of terminal commands with it, my personal policy is that I believe that humans are usually the biggest source of problems in the software development chain, and I intentionally don’t trust myself to remember commands correctly. I go out of my way to enter the fewest number of terminal commands I can and automate everything I can automate to cut back on human errors.
It’s rather simple to get AI to automate your Github workflow in cursor. You can see how i’ve done it personally in this video. instead of using Github Desktop or entering terminal commands, I’m already in the AI chat prompt so I just say “commit and push the latest.”
That’s all for today, you are doing great for making it this far. In the next parts of the series we will get to the more hands-on tech stuff, and talk about making actual software.
If you are just joining us, catch up with the series here:
Vol 1.: Day 1 Ground Floor Basics To Help You Out
Vol 2.: You're building a building without a blueprint
If you want me to cover a specific question or topic, comment below.
If you have found this useful to your vibecoding, you can support me by buying me a coffee:
There are a dozen options out there for version control systems, if you want to impress nerds, use the acronym VCS. Since Github is the industry standard and has the most friendly tools, for our purposes here as beginners just set it in your mind that Version Control = Github, and don’t worry about other VCSs.