Live on GitHub Pages

It worked.
Your first GitHub Page is live.

You uploaded index.html, switched on Pages,
and the internet did the rest. That's it. That's web publishing.

bash
~$ git add index.html
~$ git commit -m "my first page"
[main] 1 file changed, 1 insertion(+)
~$ git push origin main
Enumerating objects: 3, done.
โœ“ Deployed โ†’ https://username.github.io/repo
~$

How you got here

Four steps to a live website

01 / 04 ๐Ÿ“

Create a repo

You made a new repository on GitHub and named it something sensible. That's your project's home.

02 / 04 ๐Ÿ“„

Upload index.html

You added this file to the repo. GitHub looks for index.html by default โ€” that's the page it serves.

03 / 04 โš™๏ธ

Switch on Pages

Settings โ†’ Pages โ†’ Source: main branch. GitHub builds and deploys your site automatically.

04 / 04 ๐ŸŒ

Get your URL

GitHub gives you a public URL at username.github.io/repo. Share it. It works on any device.


No terminal needed

Upload files in the browser

You don't need Git or a terminal to get files into GitHub. You can drag and drop straight from your desktop into the browser. Here's how.

github.com / username / my-repo
๐Ÿ“ฆ my-repo
+ Add file โ–พ
๐Ÿ“„ index.html initial commit
๐Ÿ“„ README.md initial commit
โฌ‡๏ธ
Drop files here to add them to your repo
or click Add file โ†’ Upload files above
1

Open your repo on GitHub

Go to github.com and click into your repository. You'll see the list of files.

2

Click "Add file" โ†’ "Upload files"

Find the Add file button near the top right of your file list. Choose Upload files from the dropdown.

3

Drag your file into the box

Drag index.html from your desktop straight into the dashed upload area. You'll see it listed ready to commit.

4

Commit the change

Scroll down, write a short message like add index page, then click Commit changes. GitHub Pages picks it up within a minute.

๐Ÿ’ก

Replacing a file? Upload a new version with the exact same filename. GitHub overwrites the old one and your live site updates automatically after the next deploy.