GtGit · Lesson 1 of 8

What Git Actually Solves

final.doc, final_v2.doc, final_FINAL_really.doc — everyone has done this. Git is that instinct, systematized: every saved version kept, named, dated, and recoverable.

Git is a version control system: it records snapshots of your project over time. Each snapshot (a 'commit') remembers exactly what every file looked like, who saved it, when, and why. You can view any old version, compare versions, or roll back to one — nothing committed is ever lost.

Three places your files live: the working directory (the actual files you edit), the staging area (files marked to go into the next snapshot), and the repository (the permanent history, stored in a hidden .git folder). The daily loop is: edit files, stage them, commit them.

Bash
# Turn any folder into a git repository:
cd my-project
git init

# The .git folder now holds all history.
# Delete .git and it's just a normal folder again.

# The single most-used command — what's changed?
git status
◆ Note
Git is not GitHub. Git is the tool on your machine; GitHub is a website that hosts git repositories so people can share them. GitLab, Codeberg, and Bitbucket do the same job.