Source: https://learn.nodegx.io/online/github-basics
Summary: What Git and GitHub are, how to make a free account, and how to let Claude save and restore snapshots of your NodeGX project.

# GitHub basics

GitHub keeps save points of your project online. You need it to put an app online, and it lets you undo a change that went wrong. Claude can do almost all of the work for you.

## Git and GitHub, in plain words

**Git** is a tool that takes save points of a folder. Each save point is called a **commit**: a snapshot of every file at that moment, with a short note saying what changed.

**GitHub** is a website that keeps a copy of those save points online. Your project's home there is called a **repository** (or "repo"): the project's files plus all of its save points.

A NodeGX project is a folder of plain files on your computer, so Git works on it like on any other folder.

## Why save points matter more with AI

Claude can change many files in one go. Most of the time that is what you want. But when a change goes wrong, it can be hard to see everything it touched.

A save point before each piece of work solves this. If something breaks, you go back to the last snapshot that worked and try again.

The copy on GitHub also protects your work if your computer is lost or broken.

## Make a free account

1. Go to [github.com](https://github.com) and click **Sign up**.
2. Enter your email address, a password and a username. Your username appears in your project's web address on GitHub, so pick one you are happy for others to see.
3. Confirm your email address when GitHub asks you to.

The free plan is enough. Keep your repositories **private**: a private repository can only be seen by you and the people you invite.

## Let Claude do the git work

Open a new conversation in the Code tab of the Claude desktop app and paste this. If Claude asks which project, tell it the name.

```text
Please set up git for this NodeGX project and put it on GitHub as a private repository — walk me through anything I need to click.
```

Claude may need to install Git first, or ask you to sign in to GitHub in your browser. It will tell you what to do at each step.

After that, a few prompts cover most days. When something works and you want to keep it, or before you start something new:

```text
Save a snapshot of what we have now with a clear message.
```

To put your latest snapshots on GitHub:

```text
Send our latest snapshots up to GitHub.
```

When a change has broken things:

```text
Undo back to the last snapshot.
```

Undoing throws away every change made since that snapshot. That is usually what you want, but read what Claude says it will remove before you agree.

## The one rule: passwords and keys never go into GitHub

Never put a password, an API key (a secret code that lets your app use another service, such as an email service) or any other secret into a repository. This applies to private repositories too.

Once a secret is in a snapshot, it stays in the history even if you delete the file later. If it happens, treat the secret as leaked: change the password, or make a new key and delete the old one.

Before you send anything to GitHub, you can ask Claude to check:

```text
Before you send anything to GitHub, check that no passwords, API keys or other secrets are included. Tell me what you found.
```

## GitHub inside NodeGX

NodeGX's start screen (the launcher) has a **Connect GitHub** button at the top right, and a **GitHub** tab.

**Connect GitHub** signs NodeGX in to your GitHub account. It opens a GitHub page in your browser and shows you a short code. Type the code on that page and NodeGX shows "Your GitHub account is connected".

The **GitHub** tab then lists your repositories that contain a NodeGX project. Each one has a **Clone** button. Cloning means downloading a copy to your computer: NodeGX asks you which folder to put it in, then offers to open it. This is how you open your project on a second computer.

The editor's sidebar also has a **Version control** panel. You do not need it while Claude is doing the git work for you.

::: everything
## The git commands underneath

These are the commands Claude runs for you. You can type them yourself in a terminal, inside the project folder.

| Command | What it does |
|---------|--------------|
| `git init` | Start tracking this folder |
| `git status` | Show what has changed since the last snapshot |
| `git add -A` | Include every change in the next snapshot |
| `git commit -m "Add the sign-up page"` | Take the snapshot, with a message |
| `git push` | Send your snapshots to GitHub |
| `git log --oneline` | List past snapshots, newest first |
| `git restore .` | Throw away changes to files since the last snapshot |

`git restore .` leaves brand-new files in place. `git clean -fd` deletes those too, and cannot be undone.

NodeGX lists `.mcp.json` in the project's `.gitignore` file (the list of files Git should skip). That file holds paths that only make sense on your computer. When you open a cloned project, NodeGX writes a fresh one for that computer.
:::

## Quick reference

- A **commit** is a snapshot. A **repository** is your project plus all its snapshots. GitHub keeps them online.
- Make your GitHub account free, and keep repositories private.
- Ask Claude for a snapshot whenever something works, and before you start something new.
- "Undo back to the last snapshot" throws away everything since then.
- Passwords and keys never go into GitHub. If one does, change it.
- **Connect GitHub** and the **GitHub** tab in the launcher let you clone your projects onto another computer.
