git add

git add selects changes to include in the next commit; it does not create the commit yet.

What you will learn

Minimal example

git status; git add index.html; git diff --staged; git commit -m "Update the page"

Check the status, stage the intended file, review the staged diff, and then commit it.

Common mistakes