Code & computing / QUICK REFERENCE
Everyday Git
The small set of commands for seeing changes, saving work and understanding your history.
Look before you change
- Working tree overview
git statusSee staged, unstaged and untracked files. [1]
- Unstaged changes
git diffCompare tracked working-tree changes with the staging area. Untracked file contents are not included. [1]
- Staged changes
git diff --cachedCompare staged changes with the current commit. [1]
- Recent commits
git log --oneline -5Show a compact list of the five most recent commits reachable from the current branch. [1]
Save a deliberate snapshot
- Create a repository
git initInitialize Git in the current directory. Run once for a new project. [1]
- Stage one file
git add notes.txtStage the current contents of this file. Later edits must be staged again. [1]
- Commit staged changes
git commit -m "Describe the change"Create a commit containing what is staged, not every edit in the working tree. [1]
- List local branches
git branchList local branch names. The current branch is marked with an asterisk. [1]
PROVENANCE, NOT A PROMISE
Sources & verification
Primary-source tutorial checked during preparation. The repository test suite exercises this local inspect/add/commit workflow in a disposable repository; it does not test every Git version, remote hosting service or merge scenario.
Independent review pending. This sheet was prepared with AI assistance. Source checks and automated tests do not establish universal correctness.
- Git tutorial ↗Git project · accessed 2026-10-19
cheatsheetatlas.com/sheets/git-everyday/ · Starter example · Revision 1 · 2026-10-19