Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Pushing Code to GitHub | Putting Your App Online
Web App from Scratch with Claude

bookPushing Code to GitHub

Swipe to show menu

Note
Definition

GitHub is a platform for hosting and managing code using version control (Git). It lets developers store projects, track changes, collaborate with others, and share their work online.

Right now your project lives in a folder on your computer. In order to publish it online you need to move it somewhere a hosting platform can access it. GitHub is that middleman.

Think of GitHub as cloud storage for code. Your files stay on your computer but GitHub keeps a copy that other tools — like the hosting platform we use in the next chapter — can read and deploy from.

Note
Note

GitHub stores your code. Vercel publishes it. We are doing GitHub first.

What you need to do

  1. Create a GitHub account Go to github.com and click Sign Up. If you already have an account, simply sign in

  2. Ask Claude Code to push your project You do not need to handle GitHub setup manually. Ask Claude Code:

    How can I get my app published? I have a GitHub account. I want the simplest way to publish the app.
    

    Claude Code will guide you through pushing your project to GitHub. When prompted to authorize via github.com/login/device, follow the steps, enter the code, and click Approve

  3. Confirm your project is live on GitHub Once complete, Claude Code will provide a GitHub URL Open the link and make sure all your project files are there

One important thing to know

Your project has a file called .env.local. This is where your API key lives. It is automatically excluded from GitHub by a file called .gitignore. This means your API key stays private and does not get uploaded.

You do not need to do anything here. Claude Code handles this automatically. It is just useful to know why.

Once your code is on GitHub, the next chapter covers deploying it to Vercel so your app is live on the internet with a real URL anyone can visit.

question mark

What is the main role of GitHub when deploying your code?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 1

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 5. Chapter 1
some-alt