View history
Your project's timeline
⏱ Est. ~7 min
01 · Read
Every commit you make gets recorded in git's log — the timeline of your project's history. You can view this history anytime to see what changed when, and who changed it.
💡 Picture thisgit log is like flipping through your project's photo album. Each page is a snapshot (commit) with a date stamp, your name, and the caption you wrote on the back. You can flip through quickly with --oneline, or look at each page in detail.
Key points
- git log shows the full commit history with hash, author, date, and message
- git log --oneline shows a condensed "one commit per line" view
- Newest commits appear at the top
02 · Terminal exercise
Let's set up a project with commits first, so we have history to view.
(This section is interactive — please enable JavaScript.)
03 · Terminal exercise
Stage all the files.
(This section is interactive — please enable JavaScript.)
04 · Quiz
What does git log --oneline show?
- Only the last commit
- Only today's commits
- The names of changed files
- A condensed list: one commit per line with short hash and message
05 · Terminal exercise
Make a commit to save this snapshot.
(This section is interactive — please enable JavaScript.)
06 · Terminal exercise
git log shows your project's timeline — every commit you've made, with the newest at the top.
(This section is interactive — please enable JavaScript.)
07 · Terminal exercise
When you have many commits, the full log gets overwhelming. There's a condensed version.
(This section is interactive — please enable JavaScript.)
08 · Drag to sort
Sort these git commands into the correct order of the basic workflow.
(This section is interactive — please enable JavaScript.)
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.