Version control

A system that records snapshots of your project over time so you can review and undo changes. Git is the most common.

Version control tracks the history of your files as a series of commits — saved snapshots you can return to. It lets you experiment safely, see what changed and when, and undo mistakes. Git is by far the most widely used system.

The everyday loop is small and repeatable: stage your changes, commit them with a message, and repeat. Small, frequent commits make the history easy to read and to roll back.

Example
git init                          # start tracking a project
git add app.py                    # stage a change
git commit -m "Add dry-run mode"  # save a snapshot
git log --oneline                 # review the history

Where this shows up in real Python

Version control is your safety net: checkpoints before risky edits, a full history to undo mistakes, and a way to collaborate without overwriting work.

Commonly used Version control tools

  • git init — start tracking a folder
  • git add / git commit — stage and save a checkpoint
  • git status / git log — see changes and history
  • git diff — see exactly what changed

Official documentation: Git Documentation