toolbox · tool

Git

Version control: every change is a commit you can inspect or undo.

Install

winget install --id Git.Git --source winget
git --version
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

What it is

Git is distributed version control. It stores snapshots of the project, so any commit can be read, compared, branched from or reverted.

How it works

  • A commit is a snapshot with a message and a parent.
  • A branch is a movable name for a commit. Work happens on a branch, then merges into main.
  • A remote is another copy, here on GitHub. push sends commits, pull brings them back.
  • status and diff show what changed before you commit it.

In this project

  • main is the production branch every Pages project builds from.
  • Each work item gets its own branch, then a fast-forward merge into main.
  • Rollback is a revert or a Pages deployment rollback, not a mystery.
  • The games site was migrated as 1,911 files in one commit, verified file-by-file.

Gotchas

  • Windows shows LF will be replaced by CRLF warnings. Harmless; line endings are normalised.
  • Never commit node_modules/ or generated dist/ output.
  • Read git status before git add -A. It is easier to see mistakes before they are staged.