Recall first: read each stage's one-line summary and try to remember its commands. Then open the stage to check yourself.
13 stages26 commands
git --versionConfirm that Git is installed
git config --global user.name "Your Name"Set the author name used for commits
user.name and user.email become commit metadata.Watch for A commit records the configured identity, not an account you logged into on GitHub.
Open the lesson: Version control, and setting Git up once →.gitignore.git status --shortSee staged and unstaged changes in compact form
git add README.mdStage one file for the next commit
Watch for git add stages file contents; edit the file again and it can have unstaged changes too.
git switch -c feature/couponsCreate a branch and switch to it
git branchList local branches and mark the current branch
Watch for Check git status before switching; uncommitted edits may prevent the switch or move with you.
gh auth statusCheck which GitHub account and authentication method the CLI is using
gh auth loginStart the GitHub CLI login flow
Watch for Authentication with gh does not change the author identity already configured in Git.
git remote -vList remote names and their fetch/push URLs
git remote add upstream https://github.com/owner/shop.gitAdd a second remote, such as the source repository for a fork
fetch updates remote-tracking refs without changing your current branch.Watch for git pull integrates fetched changes; use git fetch when you want to inspect first.
git log --oneline --graph --allVisualize commits and branch relationships
git merge --ff-only feature/xMerge only if the current branch can move forward without a merge commit
Watch for Don't rebase commits that other people already depend on unless the team has agreed on it.
Open the lesson: Merge, rebase, squash: combining work, and fixing conflicts →git switch -c fix/42-empty-cartStart a focused branch for an issue
gh issue list --label bug --assignee @meFind assigned bug issues with the GitHub CLI
Watch for Passing local tests alone does not satisfy required checks configured on the remote.
Open the lesson: Collaboration: issues, pull requests and code review →git revert --no-edit HEADCreate a new commit that reverses the current commit
git log --oneline -2Verify the latest history after an undo
revert preserves shared history by adding an inverse commit.reflog can help recover a recent commit reference after a local pointer move.Watch for reset moves a branch pointer; avoid using it to rewrite commits already shared with others.
git log --oneline --since="2 weeks ago"Filter commit history by date
git switch --detach HEAD~3Inspect an earlier commit without switching to a branch
git bisect narrows a regression by repeatedly testing a known-good and bad range.Watch for If you commit in detached HEAD, create a branch before switching away so the commit stays reachable.
Open the lesson: History and diffs: find what changed, who changed it, and when it broke →git commit --amend --no-editAdd staged changes to the previous commit without changing its message
git log --oneline main..Review commits on the current branch that are not on main
Watch for Never force-push over someone else's work; inspect and coordinate before updating a rewritten branch.
Open the lesson: Rewriting history: amend, interactive rebase and safe force-pushes →git tag -a v1.0.0 -m "First stable release"Create an annotated version tag on the current commit
git show v1.0.0Inspect the tagged commit and its annotation
Watch for A local tag is not on GitHub until you push it.
Open the lesson: Tags and releases: version numbers people can trust →git config core.hooksPath .githooksPoint this repository at its tracked hook directory
chmod +x .githooks/*Make the tracked hook scripts executable
Watch for A hook that exists in Git but is not executable will not run as expected.
Open the lesson: Hooks and automation: let Git check your work →git config --global gpg.format sshConfigure Git to use SSH keys for commit signing
git config --global commit.gpgsign trueSign commits by default
Watch for History cleanup cannot make an exposed credential safe again; revoke it first.
Open the lesson: Security and extras: secrets, Dependabot, LFS, submodules and Pages →