Skip to content

Setting up GitHub

What git actually is, the one-time setup for a new project, and the point after which the git panel handles everything.

FEWD Studio’s git panel commits and pushes for you, but a repository has to exist first. That part is once per project, and this is it.

What git is

Version control — it tracks every change you make to your files. Think of it as a save history you can go back through.

GitHub is where that history lives online, so it is backed up, reachable from another machine, and shareable with a client.

You do not need to understand git deeply to benefit from it. You need a repository and the habit of committing.

Already have a repository?

Then you do not need this page. From GitHub… on the welcome screen signs you in, lists your repositories, and clones the one you pick — see Opening a project.

This page is for a project that exists on your machine and nowhere else.

Step 1 — Create the repository

At github.com, signed in:

  1. + → New repository
  2. Give it a name — my-project
  3. Set it Private
  4. Do not tick Add a README. Leave it completely empty.
  5. Create repository
  6. Copy the URL it shows you — https://github.com/yourname/my-project.git

The empty part matters. A repository with a README in it already has a commit, and that commit will collide with your first push.

Step 2 — Connect your project

Open the terminal in FEWD — it already starts in your project directory, so there is nothing to navigate to. If the folder is not yet trusted, FEWD asks first; see Security in FEWD Studio.

git init
git remote add origin https://github.com/yourname/my-project.git
git branch -M main

Once per project, and never again.

Step 3 — The first push

git add .
git commit -m "Initial commit"
git push -u origin main

The -u origin main is only needed this once. It tells git which remote branch this one tracks.

After that

Everything goes through the git panel:

  1. Make your changes
  2. Open the git panel from the bottom bar
  3. Write a message describing what you changed — Add hero component styles
  4. Push

The panel also tells you how far ahead or behind your remote you are, and will refuse to push when you are behind. Terminal and git covers the rest of it.

A word on what you commit

Never commit a .env file or anything else holding a key. Add it to .gitignore before your first commit — after it is in the history, removing it is a great deal more work than keeping it out was.

Do commit your package-lock.json, every time. It is the record of exactly which dependency versions built your site, and it is a real security control rather than clutter — Supply chain security explains why.