Skip to content

Creating and Connecting the GitHub Repository

With a clean local repository ready, the next step is creating its home on GitHub and connecting the two. You covered this workflow in Module 05 — this lesson applies it to the real STO project.

Step 1 — Create the repository on GitHub

Section titled “Step 1 — Create the repository on GitHub”
  1. Log into GitHub and click the + icon → New repository

  2. Fill in the form:

Repository name: summit-trail-outfitters

Use lowercase and hyphens. The name becomes part of the URL — github.com/yourusername/summit-trail-outfitters. Choose a name you would be comfortable sharing with employers.

Description: Static HTML/CSS/JS hiking outfitter site — built as part of a web development learning path

A one-sentence summary that gives visitors immediate context.

Visibility: Public

The STO project is your portfolio piece. It needs to be public for employers to see it and for GitHub Pages to host it on the free tier.

  1. Do not check any initialization options — no README, no .gitignore, no license. Your local repository already has commits. An empty GitHub repo avoids history conflicts.

  2. Click Create repository.

GitHub shows the connection instructions after you create the empty repo. The commands you need are in the “push an existing repository from the command line” section.

In your STO project folder:

Terminal window
git remote add origin https://github.com/yourusername/summit-trail-outfitters.git

Replace yourusername with your actual GitHub username. Use the exact URL GitHub showed you — copy it from the GitHub page to avoid typos.

Verify:

Terminal window
git remote -v

Output:

origin https://github.com/yourusername/summit-trail-outfitters.git (fetch)
origin https://github.com/yourusername/summit-trail-outfitters.git (push)
Terminal window
git push -u origin main

Authenticate if prompted (Personal Access Token or SSH key — same as you set up in Module 05).

After the push completes, the terminal shows:

Branch 'main' set up to track remote branch 'main' from 'origin'.

Visit https://github.com/yourusername/summit-trail-outfitters in a browser. You should see:

  • Your files listed in the repository root
  • The commit message from your initial commit
  • The correct number of files and directories

Click through a few files to confirm the content is correct. The repository is now public — your STO project exists on the internet.

Terminal window
git log --oneline
a1b2c3d (HEAD -> main, origin/main) Initial commit — Summit Trail Outfitters site

HEAD -> main — your current local branch
origin/main — the remote tracking branch, now pointing to the same commit

Both are in sync after the push.

This lesson is the exercise. There is no separate practice project — you are applying the workflow to the real STO site. Confirm each step completed successfully:

  • GitHub repository created with correct name and description, visibility Public, no initialization options
  • git remote -v shows the correct URL for origin
  • git push -u origin main completed without errors
  • GitHub shows your files and commit history in the browser
  • Create the STO repository on GitHub as empty (no initialization options) — your local repo already has commits.
  • Name it summit-trail-outfitters, set it Public, add a description.
  • git remote add origin <url> connects local to remote.
  • git push -u origin main publishes your commits and sets the upstream.
  • Verify on GitHub: your files and commit history should be visible.

Next: writing a README — the document that introduces your project to anyone who finds it on GitHub.