The idea
The working tree contains your current files, the staging area selects changes for the next commit and a commit records a snapshot in local history. Saving a file is not the same as committing it, and committing is not the same as pushing. Review git status and git diff before staging, then inspect the staged diff so unintended files or secrets do not enter history.
Worked example
In a disposable repository, edit a README and a notes file. Stage only the README. A commit then records the staged README change while the notes remain uncommitted. If a private token appears in a diff, stop and remove it from the change; committing and later deleting it would still leave it in history.
Try it
On paper or in a disposable repository, draw the working tree, staging area and local history. Trace editing two files, staging one and committing it. List the status and diff checks you would use before the commit. Explain why an ignored file is not a safe place for a secret already committed.
