Why do I need GitHub?
GitHub keeps a copy of your product and every saved version online, so a lost or broken laptop doesn’t take your work with it. Hosts like Vercel, Netlify and Cloudflare also put your site online from it. The free plan includes private repositories.
Find your situation
- If you’re building a phone app
- Phone apps reach people through the app stores, not a host, but GitHub is still your backup.
- If someone wants to help, or you work on two computers
- Add the helper as a collaborator on your repository. GitHub’s free plan allows unlimited collaborators, even on private repositories. Get the latest version before you start, and push when you finish.
- If you don’t want strangers seeing your code
- Make the repository private. Only you and the people you invite can see it, and GitHub treats private repositories as confidential. Your keys stay in .env, which never goes to GitHub.
Who does what
You
- Create your GitHub account and sign in.
- Connect GitHub to your host, and pick which repositories it can see.
- Check on github.com that your files are there and .env isn’t.
Your AI tool
- Set up Git in your product and save your first version.
- Create the repository and push your product, once you’ve signed in.
- Push each working change to GitHub.
- Copy your product onto a new computer from GitHub.
Hand this to your AI tool
I want this product backed up on GitHub. Ask me whether I already have a GitHub account. If I don’t, tell me to make one myself at github.com, and wait. Before anything is uploaded, check that .env and any other files with keys are listed in .gitignore, and that no key is in my saved Git history. Show me file names only, never key values. Then help me create a private repository in my personal account and push this product to it. Let me do any sign-in myself. When it’s done, give me the repository’s link and tell me how to check that my files are there and .env isn’t. This comes from https://buildladder.com/answers/why-github. If you can open web pages, read https://buildladder.com/answers/why-github.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address. Ask me before you install anything, sign in to anything or spend money. Never ask me to paste a password or secret key into this chat.
Where to go next
- Hosting
- Vercel
- Netlify
- Cloudflare Workers
- Build your first website
- Build your first phone app
- Saving your code
- GitHub
- Build your first web app
- Should my GitHub repository be private or public?
- How often should I save a version?
- My AI tool broke something. How do I get back to a working version?
- What is GitHub?
- What is Git?
- What is a repository?
- What is a commit?
- What is continuous deployment?
Updated Sources: GitHub’s plans, GitHub Terms of Service, Git: about version control, Vercel deploys from Git.