By the end of this lesson, you will:
ℹ️ Info Version control saves snapshots of your files over time - like a time machine for your code! Track changes, collaborate easily, fix mistakes, and experiment safely.
ℹ️ Info GitHub is a social network for code where developers store projects, collaborate, and get feedback. It's like Google Drive, but specially designed for programming projects with built-in version control, team tools, and free hosting.
💡 These are the most important words you'll use when working with GitHub. Learn them well!
Repository (Repo) 📁
A special folder that stores your code and tracks every change. Can be local (your computer) or remote (on GitHub).
Commit 📸
A snapshot of your project at a moment in time. Includes a message describing changes and can be undone.
Clone 🔄
Making a copy of a GitHub project to your computer. Downloads all files and history while staying connected to the original.
Benefits of Using GitHub 🌟
Collaboration 🤝
Team coding where multiple people work on the same project, share code easily, and resolve conflicts when two people edit the same file.
Project Management 📋
Track issues, organize tasks with project boards, set goals, and release versions.
Code Quality ✨
Get feedback through code reviews, use auto-testing to catch mistakes, and learn best practices from experienced developers.
Security 🔒
Control who can access your code, verify who made each change, run security checks automatically, and keep backups in the cloud.
Common Git Commands 💻
note Don't worry about memorizing all these commands right away! Start with the basic ones and learn more as you need them.
These are the commands you'll use most often:
# Start tracking a project with Git
git init
# See what's changed in your project
git status
# Add files to be saved
git add filename.txt # Add one file
git add . # Add all files
# Save your changes with a message
git commit -m "Fixed the bug in my game"
# See the history of your project
git log
Commands for sharing your code online:
# Copy a project from GitHub to your computer
git clone https://github.com/username/repository.git
# Connect your project to GitHub
git remote add origin https://github.com/username/repository.git
# Send your changes to GitHub
git push origin main
# Get updates from GitHub
git pull origin main
Commands for organizing your project:
# Undo changes to a file
git restore filename.txt
# Stop tracking a file
git rm filename.txt
# Rename or move files
git mv oldname.txt newname.txt
Commands to see what's happening:
# See what you've changed
git diff
# See what's ready to commit
git diff --staged
# See a pretty history
git log --oneline --graph
💡 Follow these rules to become a Git pro!
- Always run
git statusbefore committing- Write clear commit messages
- Pull before you push
- Make small, frequent commits
- Keep local files synced with GitHub
ℹ️ Info GitHub Desktop is a friendly app that makes using Git super easy! No need to remember commands - just click buttons!
apps/desktopLaunch from Start menu (Windows) or Applications folder (Mac)
Sign in with your GitHub account (or create one if needed)
💡 Tip Cloning means copying a project from GitHub to your computer so you can work on it!



You have two choices:
https://github.com/username/repository

ℹ️ Info Trae IDE is where you'll write and edit your code. Let's open your cloned project!
For Windows:
For macOS:
You have two ways:


💡 Tip Now you're ready to start coding! Your project is connected to GitHub and open in Trae IDE.
You've learned how to:
Try these exercises to master GitHub:
Create Your First Repository
Explore a Popular Project
Practice Git Commands
git initRemember: The best way to learn GitHub is by using it! Don't be afraid to experiment - you can always undo changes or start fresh.