Command Reference

git add Tutorial

Explains how git add stages changes for the next commit, and why the index is central to creating cleaner history.

The short version

git add moves selected changes into the staging area so they can become part of the next commit.

Common forms

git add README.md
git add src/
git add .
git add --patch

--patch is especially important when you want clean, focused commits.