Uploading Your Carousel App to GitHub

You’ve successfully built a fully functional image carousel app using React and Vite. Your users can now upload their own images, view them in a beautiful, animated carousel, and interact with navigation buttons and thumbnails. By the end of this module, your carousel app will be live on the web and ready to share.

We'll start by uploading our local project to GitHub so it's safely stored and easily deployable.

Step 1: Initialize Git in Your Project

Open your terminal in the root folder of your carousel app (where package.json exists), and run:

git init
git add .
git commit -m "Initial commit"

Step 2: Create a GitHub Repository

  1. Go to GitHub.com
  2. Click the "+" icon → New repository
  3. Name it something like carousel-app-react
  4. Do not select README or .gitignore (leave it empty)
  5. Click Create repository

Step 3: Push Local Code to GitHub

Back in your terminal, push your code to the new repository:

git branch -M main
git remote add origin https://github.com/your-username/carousel-app-react.git
git push -u origin main

If it’s your first time pushing to GitHub, configure your credentials:

git config --global user.name "Your GitHub User Name"
git config --global user.email "your@email.com"

After pushing, your complete code will be visible on GitHub.