toolbox · tool
Git
Version control: every change is a commit you can inspect or undo.
Install
winget install --id Git.Git --source wingetgit --versiongit 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.
pushsends commits,pullbrings them back. statusanddiffshow what changed before you commit it.
In this project
mainis 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 CRLFwarnings. Harmless; line endings are normalised. - Never commit
node_modules/or generateddist/output. - Read
git statusbeforegit add -A. It is easier to see mistakes before they are staged.