This repo is a simple HTML/CSS/JS project to help you practice using Git and GitHub inside VS Code.
Follow the steps below to learn the essential workflow: clone β edit β commit β branch β push β pull request β merge.
- Copy the URL of this repository.
- In VS Code:
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P). - Run:
Git: Cloneβ paste the repo URL. - Open the cloned folder in VS Code.
- Open the Command Palette (
- Open
index.htmlorstyle.css. - Make a small change, like updating the heading in
index.html:
<h1>Hello World</h1>β‘ Change to:
<h1>Hello Git!</h1>Or tweak a CSS color in style.css.
- Go to the Source Control tab in VS Code (left sidebar, Git icon).
- Youβll see your changed files.
- Hover over them and click + to Stage Changes.
- Enter a commit message (e.g.,
Updated heading text). - Click β Commit.
- Open the Command Palette β run:
Git: Create Branch. - Name it something like
feature-update. - Make another small change (e.g., change a button color in CSS).
- Commit again with a message like:
Changed button background color.
- Click the Sync Changes button (ββ) in the Source Control tab.
- This uploads your commits and branch to GitHub.
- Go to the repository on GitHub in your browser.
- Youβll see a banner to create a Pull Request from your new branch.
- Click Compare & pull request.
- Add a description and click Create pull request.
- On GitHub, review your changes in the PR.
- Click Merge pull request β Confirm merge.
- Back in VS Code, click Sync Changes so your local
mainmatches GitHub.
- Run
git login the VS Code terminal to see commit history. - Right-click a changed file β Discard Changes to undo edits.
- Add files to
.gitignoreto stop them being tracked.
β Youβve now practiced the full GitHub workflow: Clone β Edit β Commit β Branch β Push β Pull Request β Merge β Sync
Happy coding! π
Do you want me to also generate a **starter repo scaffold** (basic `index.html`, `style.css`, `script.js`) that matches the tutorial, so learners can immediately follow along?