What is Git? — Saving Your Work Like a Pro
Learn what version control is, why every developer uses Git, and how it saves you from losing your work forever.
The Problem Git Solves
How Git Works (Simplified)
Your First Git Commands
# Start tracking a project with Git
git init
# Check what has changed
git status
# Tell Git to track a file
git add myfile.js
# Save a snapshot with a message
git commit -m "Added the homepage layout"
# See the history of all your snapshots
git logGit is not the same as GitHub! Git is the tool that tracks changes on your computer. GitHub is a website where you can store your Git projects online and share them with others. Think of it this way: Git is like a camera (takes snapshots), and GitHub is like a photo album in the cloud (stores and shares them).
If you have Git installed (check by typing 'git --version' in your terminal), create a new folder, run 'git init' inside it, create a simple text file, and make your first commit. Then change the file, commit again, and use 'git log' to see your two snapshots. You just created your first version history! If you do not have Git installed yet, go to git-scm.com to download it.
Ready to build?
Put what you learned into practice — pick a project and start coding.
Start Building Free