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”-
Log into GitHub and click the + icon → New repository
-
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.
-
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.
-
Click Create repository.
Step 2 — Connect the local repository
Section titled “Step 2 — Connect the local 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:
git remote add origin https://github.com/yourusername/summit-trail-outfitters.gitReplace yourusername with your actual GitHub username. Use the exact URL GitHub showed you — copy it from the GitHub page to avoid typos.
Verify:
git remote -vOutput:
origin https://github.com/yourusername/summit-trail-outfitters.git (fetch)origin https://github.com/yourusername/summit-trail-outfitters.git (push)Step 3 — Push to GitHub
Section titled “Step 3 — Push to GitHub”git push -u origin mainAuthenticate 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'.Step 4 — Verify on GitHub
Section titled “Step 4 — Verify on GitHub”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.
What git log --oneline shows now
Section titled “What git log --oneline shows now”git log --onelinea1b2c3d (HEAD -> main, origin/main) Initial commit — Summit Trail Outfitters siteHEAD -> main — your current local branch
origin/main — the remote tracking branch, now pointing to the same commit
Both are in sync after the push.
Exercise
Section titled “Exercise”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 -vshows the correct URL fororigin -
git push -u origin maincompleted 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 mainpublishes 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.