Basics: from file to commit · Lesson 1 of 15
Why version control?
What Git solves, and how it differs from GitHub and random backup copies.
If your files are named final.js, final-2.js and final-really.js, you are doing version control by hand. Git records connected snapshots of a project: what changed, by whom, and why. You can test an idea, return to a known-good state, or combine a team's work without emailing ZIP files.
Git is a local program; GitHub hosts repositories and adds pull requests, reviews and team tools. Git works without GitHub.
Project files
Git records snapshots
Remote for sharing
GitHub: reviews and PRs
git init -q -b main echo "SeaCode" > README.md git status -s
git init creates a repository in a hidden .git directory; your files do not move. status -s says ?? README.md: the file exists but Git is not tracking it yet. Git is distributed: every clone carries the full history, not only the latest files.
Quick question
Which statement is correct?
Exercise
Start a repository on main, create README.md containing Hello Git, and print short status.
Expected output: ?? README.md
echo "Hello Git" > README.md git status -s
Learn more from
Played 0 of 2 games
Sign in to save your progress and earn XP.