Skip to content
CashPlanetAcademy
Resources · Beginner · guide

Git without fear

Enough version control to not lose a page — including a first repo from the browser.

Git is a history of your files. You need four ideas:

  1. A repository is the project folder plus its history.
  2. A commit is a snapshot with a sentence (“add Saturday rota”).
  3. Push copies that history to a host (GitHub, GitLab).
  4. Clone copies it back to another machine.

You do not need branches for a first project. Commit when something works, even if it is ugly.

First repo from the browser

If the command line feels hostile, stay in the browser this week.

  1. On GitHub, click New repository. Name it. Leave it public if you want a free host later.
  2. Add a file called index.html in the web editor. Paste your page. Commit with a sentence a future you will understand.
  3. Edit again tomorrow. Each commit is a save you can walk back.

That is a real repository. Hosting can attach to it later.

Four commands, when you are ready

On a laptop, inside the project folder:

git status
git add .
git commit -m "show Friday tomato prices"
git push

status tells you what changed. add stages it. commit snapshots. push sends. If push asks you to log in, use the host’s instructions — do not paste a password into a random video.

When you mess up

  • You deleted a paragraph: look at the last commit on GitHub and copy it back.
  • You committed a secret: rotate the key. Deleting the file is not enough. Read the field guide on environment variables when you get there — not before you have a secret.
  • Two devices disagree: prefer the copy you can open and read. History is for recovery, not for shame.