Commit your source
Quest: commit-source
Mission
Review a real source change before staging it, then commit and inspect the history. Preserve source as you improve it, not only at the final handoff.
Commands You Will Use
git statusgit diffgit addgit commitgit log
Steps
- Run
cd ~/src. Stop if it fails; do not run Git in a different directory by accident. If this is not yet a repository, follow the Git workflow first. - Run
git statusandgit diff --staged. If unrelated changes are already staged, preserve them and ask for help separating the work before committing. - Run
git diffto read unstaged changes. Read new files in your editor too: unstaged diffs do not display untracked file contents. - Stage only the intended source paths with
git add --, followed by those paths. For an edited homepage, usegit add -- pages/index.md; do not usegit add .. - Run
git diff --stagedagain. Inspect the complete staged diff for unintended changes and credentials before proceeding. - If the staged changes are correct, commit with a message describing the actual work, such as
git commit -m "Document my web server". If nothing changed, do not create an empty commit. - Run
git log --onelineandgit statusto confirm the result. This quest does not require pushing. - If you use recorded progress, ask the guide to check your command history. Its observation is not a review of your source or proof of a recoverable handoff.
Hints
- Commit source, not generated output under
~/public_html. Never stage passwords, tokens, or private keys. - Read both unstaged and staged diffs before the commit; the complete staged diff determines what will be saved.
If Check Fails
Run the missing git command, then ask for another check.

Linux Foundations