Cloud Backup & Portfolio
On January 31, 2017, a tired engineer at GitLab (a company that builds tools for developers) ran a delete command on the wrong database. The production database. The one serving millions of users.
They had five different backup systems. None of them worked. Automated backups had never actually run due to a misconfiguration. The failure alerts were being silently rejected by email filters. They lost six hours of user data and streamed the panicked recovery live in a Google Doc for the world to watch. (Source)
Their lesson, printed on t-shirts afterward:
"A backup you've never tested is a backup that doesn't exist."
Sarah's Dead Laptop
Sarah's laptop battery dies while she's editing the volunteer list. When she charges it and restarts, the file is corrupted. Everything since her last email attachment is gone.
Her project exists on one computer. That computer just failed. If she'd pushed to GitHub, she could recover everything in thirty seconds from any other device.
What Is GitHub?
GitHub is a website that stores your Git project in the cloud. It's two things at once:
- Cloud backup: If your computer breaks, your project survives
- Portfolio: When you share
github.com/yourname, employers see your real projects, your commit history, and how you solve problems
Git is the tool on your computer. GitHub is the cloud service that stores copies of your Git projects. They work together but are not the same thing.
Sarah's Mistake
Sarah is excited. She just learned about GitHub and wants to push her fundraiser project immediately. She runs git push, and it works. Everything is on GitHub. She's thrilled.
Then Maya messages her: "Hey, I can see your Stripe API key on GitHub. The one for the donation page."
Sarah's stomach drops. She had a config.json with the payment API key for their fundraiser donations page. She committed it in Lesson 1 without thinking. Now it's on the public internet.
She deletes the file and pushes again. Problem solved, right?
Wrong. The key is still in her commit history. Anyone who clones the repository gets every version of every file: including the one she "deleted." The key is out there. She has to log into Stripe, revoke the old key, and generate a new one.
This is the most common security mistake in version control. It happens to professionals too. The fix isn't deleting the file; it's making sure the file never gets committed in the first place.
Step 1: Protect Secrets First
Before pushing anything to the cloud, set up protection. API keys, passwords, personal notes: these should never leave your computer.
What you tell your agent: "I have a config file with my API key. Make sure it never gets uploaded to GitHub."
What the agent does:
echo "config.json" > .gitignore
echo ".env" >> .gitignore
git add .gitignore
git commit -m "Add gitignore to protect secrets"
.gitignore tells Git which untracked files to skip. Files listed there won't be staged, committed, or pushed going forward.
If a file was already committed earlier, .gitignore alone won't protect it. You must untrack it first:
git rm --cached config.json
git commit -m "Stop tracking config.json"
Create .gitignore before your first push. Sarah learned this the hard way: once a secret is in Git history, deleting the file doesn't remove it from past commits. If that happens, you need to revoke the exposed key immediately and generate a new one.
Step 2: Create a Repository on GitHub
If you haven't created your GitHub account yet, do that first (see Before You Start).
Now create an empty repository on GitHub:
- Click the + icon (top right) and select "New repository"
- Name it to match your local project (e.g.,
fundraiser-project) - Select Public so it's visible as a portfolio piece
- Don't check "Add a README": you already have files locally
- Click "Create repository"
Step 3: Push Your Project
What you tell your agent: "Push my project to GitHub."
What the agent does:
git remote add origin https://github.com/yourname/fundraiser-project.git
git push -u origin main
GitHub may ask for authentication. Follow its prompts: it will guide you through setting up a personal access token or SSH key. If you get stuck, tell your agent: "I'm getting an authentication error when pushing to GitHub." It can walk you through the fix.
What remote add origin means: You're telling Git, "This is where the cloud copy lives." The name origin is just a convention; it's the default name for your main cloud location.
Verify it worked: Open your repository page on GitHub. You should see your files and commit history: an exact copy of what's on your computer.
Step 4: Test Your Backup
This is the step most people skip. And it's the most important one.
What you tell your agent: "I want to prove my backup works. Clone my project to a different folder."
What the agent does:
cd ..
mkdir backup-test
cd backup-test
git clone https://github.com/yourname/fundraiser-project.git
cd fundraiser-project
ls
git log
Do you see all your files? All your commits? Then your backup works.
Now clean up the test:
cd ../..
rm -rf backup-test
Sarah can now recover her entire project from any computer with internet access. Her dead laptop is an inconvenience, not a catastrophe.
Troubleshooting
"Authentication failed": Use a personal access token, not your GitHub password. Go to GitHub Settings, then Developer settings, then Personal access tokens.
"origin already exists": You already added a remote. Run git remote remove origin then try again.
"branch name mismatch": Your local branch might be called master instead of main. Run git branch -M main to rename it.
Your Portfolio Is Live
Right now, your GitHub profile is visible to the world. When you share github.com/yourname with:
- Employers: They see real projects, not resume claims
- Collaborators: They can review your work and your process
- Your future self: Every project you push is one more thing you'll never lose
Your code is in the cloud. But right now, anyone (including your future self) would merge changes blindly. How do you review before you trust?
That's what the next lesson solves.
Try With AI
Set up your GitHub profile:
"I just pushed my first project to GitHub. Help me make my GitHub profile professional. What should my bio say? What makes a good profile picture? How do I pin my best repositories?"
Test your backup:
"Walk me through a complete backup verification test. I want to clone my project to a temporary folder, verify all files and history are intact, then clean up the test folder. Include the exact commands."
Build your portfolio strategy:
"I'm building a portfolio of AI-assisted projects. What types of projects should I include? How do I showcase that I used AI collaboration? What do employers look for on a GitHub profile?"
Simulate a disaster recovery:
"Pretend my laptop just died. All I have is my GitHub account and a new computer. Walk me through recovering my project from scratch: installing Git, cloning, verifying everything is intact, and getting back to work. How long would this take? What would I lose if I hadn't pushed in three days?"