Overview
Use git add --all or git add -A when every detected project change belongs in the next commit.
Use git add . when you intentionally want the current directory and its descendants.
Use an exact file path when you want precise control.
Use a pattern such as *.txt only when its current-directory scope matches your intent.
After any broad staging operation, use git status as the verification step rather than assuming the selection is correct.