The Big Picture
Before touching any buttons, let's understand what problem GitHub actually solves.
Sound familiar?
Imagine you're writing a book. Your desktop ends up looking like this:
Which one is current? If you delete the wrong one, it's gone forever. We've all been there.
GitHub is a website that stores those tracked projects online โ like a safe in the cloud with a perfect memory.
- Back up your work in the cloud
- See history โ every change, who made it, and when
- Undo mistakes by going back to an earlier version
- Collaborate without overwriting each other's work
- Share projects with the world
The Filing Cabinet Analogy
Key Terms
Plain English definitions โ no dictionary required.
Repository (repo)
A project folder Git tracks โ files plus full history. Public or private.
Clone
Download a copy of a repo from GitHub to your computer.
Commit
A saved snapshot with a description โ like a video game restore point.
Push
Upload your local commits to GitHub so the online copy is current.
Pull
Download the latest changes from GitHub to your computer.
Branch
A parallel version to experiment without breaking the main version.
Merge
Combine changes from one branch into another.
Fork
Your own copy of someone else's repo โ change it without affecting the original.
Pull Request (PR)
A request to merge changes โ with space for review and discussion.
.gitignore
Tells Git which files NOT to track โ passwords, temp files, large downloads.
Setting Up
Four steps to go from zero to ready.
Create a GitHub account
Go to github.com โ Sign up โ choose username, email, password โ verify email. Your username becomes part of every repo URL: github.com/yourusername/project-name
Install Git on your computer
Git is the engine; GitHub is where repos live online. On Mac, run git --version in Terminal. On Windows, download from git-scm.com.
Tell Git who you are
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
Install GitHub Desktop (optional)
If the command line feels intimidating, GitHub Desktop gives you buttons for clone, commit, push, and pull. Many beginners start here.
Your First Repository
Two ways to create a repo โ pick whichever feels easier.
Option A: On the GitHub website (easiest)
Click + โ New repository
Name it (no spaces โ use hyphens: my-first-project), add a description, choose Public or Private, check "Add a README file", then Create.
Option B: From your computer
# Create and enter project folder mkdir my-first-project && cd my-first-project git init # Create a README and save first snapshot echo "# My First Project" > README.md git add . git commit -m "Initial commit" # Connect to GitHub and upload git remote add origin https://github.com/yourusername/my-first-project.git git push -u origin main
Cloning an existing repo
git clone https://github.com/yourusername/my-first-project.gitThis downloads the folder with all files and full history.
The Daily Workflow
The cycle you'll repeat hundreds of times. Watch it loop:
Your daily Git rhythm
git pull first to get the latest changes โ especially on a team.Good vs. bad commit messages
"Fix typo in installation instructions" โ clear and specific"stuff" or "asdfasdf" โ you'll regret this laterWorking With Others
GitHub makes teamwork possible without chaos.
Invite collaborators
Repo โ Settings โ Collaborators โ Add people by username or email.
Clone a teammate's repo
git clone https://github.com/teammate/project-name.git
The Golden Rule
Pull before you push. Always run git pull before starting work and before pushing.
Branches Explained Simply
Experiment safely without breaking the stable version.
git checkout -b add-new-section # Create & switch # ... make changes, commit ... git push -u origin add-new-section git checkout main # Switch back
Pull Requests
A PR isn't just "please merge" โ it's a conversation space.
Push your branch
GitHub shows a "Compare & pull request" banner โ click it.
Write title & description
Explain what changed and why. Link related Issues.
Review & merge
Reviewers comment, request changes, or approve. Then click Merge pull request.
Issues & Project Boards
GitHub's built-in to-do list and bug tracker.
Issues are tickets you assign, label, and discuss. Repo โ Issues โ New issue.
Project Boards are Kanban-style boards (To Do โ In Progress โ Done) under the Projects tab.
README Files
The front page of your repo โ the first thing visitors see.
# Project Name One sentence explaining what this project is. ## What is this? Longer description for people with no context. ## Getting Started Step-by-step instructions. ## How to Contribute Guidelines for helpers. ## License Who can use this and how.
Common Mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Forgetting to pull first | Merge conflicts | Always git pull first |
| Committing passwords | Security risk forever | Use .gitignore |
| Vague commit messages | Hard to find changes | Write clear messages |
| Huge files in repo | Slow, bloated repo | Use cloud storage instead |
| Big changes on main | Break stable version | Use branches |
| Not pushing for days | Work lost if laptop dies | Push daily |
When Things Go Wrong
Wrong branch?
git checkout correct-branch then git cherry-pick <hash>. Fixable โ ask for help!
Undo last commit?
git reset --soft HEAD~1 keeps your file changes.
Merge conflict?
Open the file, delete conflict markers, keep the right text, then commit.
Deleted something?
git log -- file.txt then git checkout <hash> -- file.txt
GitHub vs. Other Tools
| Tool | What it is | When to use it |
|---|---|---|
| GitHub | Online home for Git repos | Code, docs, team projects |
| Google Drive / iCloud | Cloud file storage | Single docs, photos โ no Git history |
| Obsidian | Personal note syncing | Notes โ not code collaboration |
Cheat Sheet
# Setup (once) git config --global user.name "Your Name" git config --global user.email "you@email.com" # Daily loop git pull # Get latest git status # What changed? git add . # Stage all git commit -m "message" # Save snapshot git push # Upload # Branches git branch # List git checkout -b new-branch # Create & switch git log # History
Glossary
| Term | Definition |
|---|---|
| Commit | A saved snapshot at a point in time |
| Repository | A tracked project folder with full history |
| Remote | The copy on GitHub's servers |
| Local | The copy on your computer |
| Clone | Download a repo to your machine |
| Push / Pull | Upload / download commits |
| Branch | An independent line of development |
| Pull Request | Request to merge with review space |
| README | Front-page description file |
| .gitignore | Files Git should not track |
| Open source | Public repos anyone can use |