status and inspection

status and inspection

commands to see what's going on before you touch anything

status and inspection

stuff to run before you do anything — just to see what's going on.

copy
git status

shows what's staged, what's modified, what's untracked. run this constantly.

copy
git log --oneline

compact history. one commit per line. much less noisy than plain git log.

copy
git log --oneline --graph

same but draws the branch tree. useful when you're trying to understand how branches relate.

copy
git diff

shows unstaged changes. if you've already staged something, use git diff --staged to see what's actually going in.

copy
git show abc1234

shows what a specific commit changed. swap abc1234 for any commit hash from git log --oneline.