Overview
Use the following review loop:
- Run git status to inspect all pending changes.
- Choose a staging scope.
- Run the appropriate git add command.
- Run git status again to verify what moved into the staging area.
- If the selection is wrong, run git reset and stage again more precisely.
Example: stage the whole repository from its root.
git status
git add .
git status
Example: stage only one file.
git add 1.txt
git status
Example: stage a file inside a folder.
git add my-folder/3.txt
git status
Example: stage everything, reconsider, and return the changes to the working directory.
git add --all
git status
git reset
git status