Your first commit
A commit is a snapshot with a message. You stage what you want, then commit with a description of *why* you made the change. That message is the gift you give to your future self.
Once you've staged some changes (git add), you commit them with git commit -m "message". Git takes a snapshot of your staging area and stores it in the history with your name, date, and the message you wrote.
Commit messages matter. They're how you (or your teammates) understand what happened 6 months from now. 'fix' is useless. 'fix login redirect when callback URL is empty' is gold.
Convention: a short imperative line first (50 chars max), then a blank line, then a longer paragraph if needed. 'Add login form' (good), 'Added a login form' (also fine, just be consistent), 'Login form' (less clear).
Quick add+commit: git commit -am "..." stages all modified tracked files and commits in one go. Doesn't catch new untracked files — for those you still need git add first.
Each commit has a hash — a long string like a1b2c3d.... You can refer to a commit by its first 7-8 chars (a1b2c3d). HEAD is a shortcut for 'the commit I'm on right now', HEAD~1 is 'the commit before', HEAD~3 is '3 back'.
Practice
Type the command to commit your staged changes with the message "Add login form".
Practice
Type the shortcut to stage all *modified tracked* files AND commit with message "Fix typo".
Grounded on https://git-scm.com/docs/git-commit
Next up
.gitignore — files Git should ignore
A plain-text file at your repo root listing patterns Git won't track: `node_modules/`, `.env`, build artifacts. Without it your repo bloats with noise.