Skip to content

Create a GitHub Account and Push Your Project

This page teaches you how to create a GitHub account, set up a repository, and push your Finance App project from your computer to GitHub.

By the end of this page, you will have:

  • A GitHub account
  • A repository for your project
  • Your project files uploaded to GitHub

GitHub is a website that stores your project code online. Think of it as a cloud folder for your website files.

You need GitHub because most hosting platforms — Cloudflare Pages, Vercel, Netlify — connect directly to GitHub. When you update your code on GitHub, your website updates automatically.

  1. Open your browser and go to:
https://github.com/signup
  1. Enter your email address. Use an email you check often.
  2. Create a strong password. GitHub will show a warning if the password is too weak.
  3. Choose a username. Use lowercase letters, numbers, and dashes. No spaces.
  4. Solve the visual puzzle to verify you are human.
  5. Check your email inbox. GitHub will send a launch code. Copy the code and paste it back into the browser.
  6. Your account is now created.

Important: Write down your username and password. You will need them later.

A repository (repo) is a folder on GitHub where your project lives.

  1. Log in to GitHub
  2. Click the + button in the top right corner
  3. Select New repository
  4. Fill in the form:
Field What to Enter
Repository name A short name, like finance-app
Description Optional. Example: “My Finance App website”
Visibility Choose Public or Private

Important: Do NOT check “Add a README file”, “Add .gitignore”, or “Choose a license”. Leave them unchecked. Your project already has files, and adding these will cause conflicts later.

  1. Click Create repository

You will see a page with instructions and a URL. Keep this page open — you will need the URL in Step 6.

Git is a tool that sends your files from your computer to GitHub.

  1. Go to:
https://git-scm.com
  1. Download the version for your operating system (Windows, Mac, or Linux)
  2. Run the installer. Click Next on every screen — the default options are fine.
  3. Restart your terminal after installation

To confirm Git is installed, open a terminal and type:

git --version

You should see a version number like git version 2.45.1.

Tell Git who you are. Use the same email you used for GitHub.

Open a terminal and run these two commands one at a time:

git config --global user.name "Your Name"

Replace Your Name with your actual name. Keep the quotes.

git config --global user.email "your-email@example.com"

Replace your-email@example.com with the email you used for GitHub.

Step 5 — Open Your Project Folder in a Terminal

Section titled “Step 5 — Open Your Project Folder in a Terminal”
  1. Open a terminal:

    • Windows: press Win, type cmd, press Enter
    • macOS: press Cmd + Space, type terminal, press Enter
    • Linux: press Ctrl + Alt + T
  2. Navigate to your project folder:

cd path/to/your/finance-app

Replace path/to/your/finance-app with the actual path to your Finance App folder.

  1. Confirm you are in the right folder:
ls

On Windows, use dir instead of ls. You should see package.json and astro.config.mjs.

Now you will link your local project to the GitHub repository you created in Step 2.

Run:

git init

This tells Git to start tracking your project folder.

Run:

git add .

The dot . means “all files in this folder”.

Run:

git commit -m "Initial commit"

This saves a snapshot of your project.

Go back to the GitHub page from Step 2. Copy the URL that looks like:

https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git

Run this command, replacing the URL with your own:

git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git

Run:

git branch -M main

Run:

git push -u origin main

GitHub will ask for your username and password. Enter your GitHub username and password. If it asks for a token instead of a password, see the troubleshooting section below.

After the push finishes, refresh the GitHub page in your browser. You should see all your project files there.

Problem Solution
git command not found Restart the terminal after installing Git
git remote add origin fails with “already exists” Run git remote set-url origin https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
Push rejected The GitHub repo has files your local repo does not. Run git pull --rebase origin main, resolve any conflicts, then push again
GitHub asks for a token instead of password GitHub no longer accepts account passwords for Git. Create a Personal Access Token in GitHub settings, and use that token as the password
main branch does not exist Run git branch -M main first, then push
Permission denied Make sure you are logged in to GitHub with the correct account

Your project is now on GitHub. You can:

  • Share the repository URL with others
  • Connect it to a hosting platform like Cloudflare Pages, Vercel, or Netlify
  • Update your code later with git add ., git commit -m "message", and git push

After pushing your project to GitHub, continue to the next section to deploy your site to a hosting platform.