πŸ“‚ How to Use the Course Git Repository

This course uses a public GitHub repository to show the complete code at every stage of learning.

Each lesson is mapped to a Git branch, so you can see exactly how the application evolves over time.

Β 

πŸ”— Repository Link

πŸ‘‰ GitHub Repo:
https://github.com/aditechkb/javascript-basics

Β 

🧠 How the Repository Is Structured

  • main branch

    • Contains the final version of the application

    • All lessons merged together

  • Lesson branches

    • Each lesson has its own branch

    • The branch shows the code up to that lesson only

    • Example (naming may vary):

      • lesson-01-html-setup

      • lesson-02-dom-access

      • lesson-03-events-state

Think of each branch as a snapshot in time.

Β 

πŸ‘€ Option 1: View Code Directly on GitHub (No Setup Needed)

This is the easiest way if you just want to read the code.

Steps:

  1. Open the repository link

  2. Click the branch dropdown (top-left, usually shows main)

  3. Select the branch for the lesson you want

  4. Browse the files and code for that lesson

πŸ‘‰ This is perfect for:

  • Reviewing after a lesson

  • Comparing changes between lessons

  • Understanding how code evolved

Β 

πŸ’» Option 2: Run the Code on Your Local Machine (Recommended)

If you want to experiment and practice, clone the repo.

Step 1: Clone the repository

Β 
git clone https://github.com/aditechkb/javascript-basics.git

Step 2: Move into the project folder

Β 
cd javascript-basics

Step 3: List all available lesson branches

Β 
git branch -a

Step 4: Switch to a specific lesson

Β 
git checkout lesson-01-html-setup

(Replace the branch name with the lesson you want.)

Β 

πŸ” Switching Between Lessons

At any time, you can switch lessons by changing branches:

Β 
git checkout lesson-03-events-state

Your files will automatically update to match that lesson.

Β 

πŸ”€ Going Back to the Final Version

To return to the complete application:

Β 
git checkout main

Β 

⚠️ Important Notes for Students

  • Do not edit code directly on main

  • Use lesson branches for learning and experimentation

  • If you make changes and want to discard them:

Β 
git checkout .

Β 

🎯 How to Follow Along with the Course

  1. Watch the lesson

  2. Switch to the corresponding Git branch

  3. Read the code

  4. Run it locally

  5. Modify and experiment

  6. Move to the next lesson branch

This mirrors how real development happens in teams.

Β 

🧩 Why We Use Branches in This Course

β€œEach branch represents a learning milestone, not just code.”

This approach helps you:

  • Understand why code was written

  • See progression, not just the final result

  • Learn Git naturally alongside JavaScript