Learn to version a real project with Git from the ground up — install and configure the tool, understand the working tree, staging area and repository, and record clean commits. You will finish able to initialise a repo, stage and commit changes, read history with log, show and diff, ignore the right files, and safely undo mistakes.
Watch the free preview
Why version control, and why Git — free to watch, no account needed.
What you'll learn
- Version a project with Git from init through committed history
- Explain the three areas — working tree, staging area and repository — and how changes move between them
- Record clean, atomic commits with well-written commit messages
- Inspect a project's history using log, show and diff
- Undo changes safely with restore, reset, revert and amend
Syllabus
Why Version Control, and Getting Set Up
Why version control, and why GitFree preview
Installing and configuring Git
The Three Areas and Your First Commits
The three areas — working tree, staging, repository
init, status, add, commit and good messages
Reading Your Project's History
Inspecting history with log, show and diff
Ignoring files with .gitignore
Undoing Changes Safely
Undoing changes — restore, reset, revert, amend
Putting it together — a clean versioning workflow
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10