Git: getting started

Lesson 04 · 10 min

History and diff

log shows commits. diff shows what changed. Without them you push blind.

10 minLesson 4 of 8Practice includedAsk AI on any point

git log --oneline — a strip of messages. git show HEAD — the last commit in full. git diff — uncommitted vs the last commit. git diff --staged — what's already in the index. Read the diff before you commit: that's how you catch a stray .env and a debugging console.log.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.