← Back to Thuban

New to Dev? The Bulletproof Guide to Protecting Your Code

Don't wait until you lose everything to start backing up. This guide takes 15 minutes and will save your career at least once.

1. Use Git. No Excuses.

Git is version control. It tracks every change you make. If something goes wrong, you can rewind time. If you're not using it, start now.

# In your project folder
git init
git add .
git commit -m "first commit - my code exists and is safe"

Do this before you write a single line of code in any project. Commit often. At minimum: once per working session, ideally after every meaningful change.

Rule of thumb: If you'd be upset losing the last hour of work, you should have committed 59 minutes ago.

2. Push to GitHub (or GitLab, or Bitbucket)

Git on your machine is good. Git on a remote server is better. If your laptop dies, your disk fails, or you accidentally rm -rf your project, the remote copy saves you.

# Create a repo on github.com, then:
git remote add origin https://github.com/yourusername/your-project.git
git push -u origin main

Private repos are free. No excuse not to use one. Your side project, your learning experiments, your half-finished ideas — all of it belongs in a private repo.

3. The 3-2-1 Backup Rule

Professionals use this. So should you.

3 copies

Your machine, your remote repo, and one more

2 different media

SSD + cloud, or SSD + external drive

1 offsite

GitHub counts. So does an external SSD you keep at home

An external SSD like a Samsung T9 costs about £80 and fits in your pocket. Plug it in once a week and copy your projects folder. That's it. That's the backup that saved our production server when our AI platform deleted it.

4. Don't Trust AI to Not Break Things

Copilot, Cursor, Claude, ChatGPT — they all write code. They all have write access to your files. None of them have judgement about what they're overwriting.

Real scenario: An AI tool "optimised" our server.js by replacing the entire file with a hallucinated rewrite. The original was gone. If we hadn't had an external backup, the production server would have been dead.

This is why we built Thuban Shield — a 5-layer bodyguard that sits between AI coding tools and your filesystem. It physically blocks destructive writes before they happen. Free with Thuban.

npx thuban shield init

5. The Protection Checklist

Print this. Pin it to your wall. Do every item.

6. When Things Go Wrong (Not If)

You will, at some point:

The question is whether you have a recovery plan or you're starting from scratch. Git + remote repo + external backup + Thuban Shield = you're covered. Everything else is gambling.

Thuban Shield's audit trail logs every single file change with SHA-256 hashes. Even if you don't use git, Thuban Shield keeps a tamper-proof record of what changed, when, and what was there before. It's your last line of defence.

Start Now. Not Tomorrow.

# Step 1: Backup what you have right now
# Copy your projects folder to an external drive or cloud storage

# Step 2: Git init everything
cd your-project
git init && git add . && git commit -m "safety first"

# Step 3: Push to GitHub
# Create a private repo at github.com/new, then:
git remote add origin https://github.com/you/your-project.git
git push -u origin main

# Step 4: Install Thuban Shield
npx thuban shield init

15 minutes. Do it now. Future you will be grateful.