Git vs GitHub — They're Not the Same Thing
This is the most common point of confusion for beginners, and clearing it up makes everything else click.
Git is a tool that runs on your computer. It tracks every change you make to your code over time. GitHub is a website where you can store and share your Git repositories online. Git can exist without GitHub. GitHub is built on top of Git.
Think of it this way: Git is like the "track changes" feature in a document editor — but for code, and infinitely more powerful. GitHub is like Google Drive — a place to store and share those tracked-changes documents online with others (or just yourself).
| Git | GitHub | |
|---|---|---|
| What it is | A command-line tool | A website / cloud platform |
| Where it runs | On your computer | On the internet |
| What it does | Tracks code changes locally | Hosts and shares repositories |
| Created by | Linus Torvalds, 2005 | Founded 2008, owned by Microsoft |
| Cost | Free, open source | Free tier + paid plans |
| Needed together? | Git works without GitHub | GitHub requires Git |
Why Version Control Changes Everything
Before you understand GitHub, you need to understand why version control exists. Imagine you're building a website. You make a change. It breaks everything. Without Git, you're frantically trying to remember what you changed and undo it manually. With Git, you type one command and your code is exactly as it was 10 minutes ago.
- Undo anything — every version of your code is saved. You can go back to any point in history in seconds.
- Work safely — branches let you experiment with new features without touching your working code. If the experiment fails, delete the branch.
- Collaborate without conflict — multiple developers can work on the same project simultaneously. Git merges their changes intelligently.
- See exactly what changed — Git shows you the precise difference between any two versions of any file, line by line.
- Document your work automatically — commit messages create a history of why you made every decision, which is invaluable 6 months later.
The Core Concepts You Need to Know
Repository (Repo)
A repository is a folder for your project that Git is tracking. It contains all your code files plus a hidden .git folder that stores the entire history. You'll have one repo per project. On GitHub, your repos are visible on your profile.
Commit
A commit is a saved snapshot of your code at a specific moment. Think of it as a checkpoint in a video game. Every commit has a message describing what changed ("Added login form", "Fixed navbar bug"). Good commit messages make you look professional.
Branch
A branch is a parallel version of your code. The main branch (called main or master) is your stable code. You create a new branch to build a feature, then merge it back when it's ready. This keeps your main code clean while you experiment.
Push and Pull
Push sends your commits from your computer to GitHub. Pull downloads the latest changes from GitHub to your computer. These two commands keep your local code and your GitHub code in sync.
Clone and Fork
Clone downloads an existing repository to your computer so you can work on it. Fork creates your own copy of someone else's repository on GitHub — useful when you want to contribute to open source or build on top of someone's project.
Pull Request (PR)
A pull request is how you propose changes to a project. You push your changes on a branch, then open a PR asking the project owner to review and merge your changes. In professional teams, all code goes through PRs before being merged.
The 10 Git Commands You'll Use 90% of the Time
| Command | What It Does |
|---|---|
git init | Start tracking a folder with Git |
git clone <url> | Download a repository from GitHub |
git status | See what files have changed |
git add . | Stage all changed files for commit |
git commit -m "message" | Save a snapshot with a description |
git push | Send commits to GitHub |
git pull | Get latest changes from GitHub |
git branch feature-name | Create a new branch |
git checkout branch-name | Switch to a different branch |
git log | See the history of commits |
Your GitHub Profile = Your Developer CV
This is the part most beginners underestimate. Hiring managers at tech companies look at GitHub profiles before they read resumes. A strong GitHub profile demonstrates actual ability — not claimed ability.
A professional photo and clear bio. A pinned section showing your 4-6 best repositories. Each repo has a good README explaining what the project does, why you built it, and how to run it. The contribution graph (the green squares) shows regular commits over months, not a burst of activity in one week.
Empty repositories with no README. Repos with names like "test123" or "homework". A commit history that shows one huge batch of commits the night before applying for jobs. No pinned repositories, so the profile shows old, irrelevant projects by default. Don't let this be you.
How to Get Started Today
Create a GitHub Account
Go to github.com and sign up. Choose a professional username — this will be on every resume and portfolio you submit for the rest of your career. Use your real name or something close to it.
Install Git on Your Computer
Download from git-scm.com. On Mac, you may already have it. Run git --version in your terminal to check. Configure your name and email: git config --global user.name "Your Name" and git config --global user.email "you@email.com".
Create Your First Repository
On GitHub, click the "+" in the top right corner and select "New repository." Name it, add a README, and create it. Then clone it to your computer with git clone <url>. You now have a local folder connected to GitHub.
Make Your First Commit
Add a file to your local folder. Run git add ., then git commit -m "My first commit", then git push. Refresh your GitHub page — your file is now on the internet. That's the full workflow.
Put Every Project on GitHub
From this point forward, every project you build goes on GitHub. Even small ones. Even the ones you're not proud of. Regular commits are how you build the contribution graph that signals "active developer" to anyone who views your profile.
· · ·
Key Takeaways
What to Remember
- Git is a local tool that tracks changes; GitHub is a cloud platform that stores and shares them
- Version control lets you undo mistakes, work safely on branches, and collaborate without conflicts
- The 6 core concepts: repo, commit, branch, push/pull, clone/fork, pull request
- 10 commands cover 90% of day-to-day Git use — you don't need to memorise everything at once
- Your GitHub profile is your developer CV — hiring managers look at it before your resume
- Start using GitHub today: create an account, install Git, and push every project from this point forward
- A consistent green contribution graph matters more than the size of your projects
References & Sources
GitHub, The State of the Octoverse 2023. GitHub Inc., 2023. User and repository statistics.
Stack Overflow, Developer Survey 2024. Stack Overflow, 2024. Version control adoption data.