Stage 2 · Lesson 1 of 7
Everyday commands: status, diff, stash, log
should become automatic before you learn the workflow, because contributing adds more to keep track of. git status tells you which you are on and what changed. git diff shows changes you have not yet (marked for the next ), and git diff --staged shows what you are about to commit.
git log --oneline --graph draws how branches relate. git stash puts unfinished work aside so you can switch branches cleanly, and git stash pop brings it back. git branch --all lists your local branches and the ones on the remote (the online copy).
Run git status before and after every command until you can predict its output. Most contributor mistakes, such as committing to the wrong branch or pushing unrelated files, are caught by one git status.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with
- BookFreePro Git
Scott Chacon and Ben Straub
Chapters 3, 5 and 6: branching, contributing to a project, and GitHub forks