Uploading the Project to GitHub

Your weather app is functional and visually appealing—but it’s not truly complete until it’s live. In this module, you’ll learn how to upload your project to GitHub and deploy it to Netlify so it’s accessible to anyone with the link. Let’s take your project from your local machine to the internet.

Uploading the Project to GitHub

To host your code online, we’ll first push your project to GitHub. If you’re not familiar with GitHub, it’s a platform for sharing code and collaborating with others. Don’t worry if this is your first time—just follow along step by step.

Option A: Upload via GitHub Website

  1. Go to GitHub.com and log into your account.
  2. Click on the + icon in the top right and choose New repository.
  3. Give your repo a name like react-weather-app.
  4. Leave all other options as default and click Create repository.
  5. Now go to your project folder on your computer and drag-drop all files (except node_modules) to this GitHub repo using the Upload files option.

Option B: Upload via Git CLI (Recommended)

If you prefer using the terminal:

  1. Open your terminal and navigate to your project folder.
  2. Run the following commands one by one:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/react-weather-app.git
git push -u origin main

Replace your-username with your actual GitHub username.

If you run into any issues, you can refer to our my GitHub repo for guidance: React Weather App Repository