Status, Diff, and Log
Part of the Git course
You made a commit in the last lesson, and that is exactly one snapshot. Real work involves editing files over and over, and before every commit you will want answers to three questions: what have I changed, what exactly did I change, and what have I already saved. This lesson is about the three commands that answer those questions without changing anything: git status, git diff, and git log.
This lesson works in the hello-git repository from lesson 01, rebuilt here so the lesson also works on its own. Press Play to create it in this lesson's folder with one commit (pressing it again starts over) ...
Want to learn Git Status, Diff, and Log in a real environment?
Click below, get a fresh Linux box with Git ready to go, and work through Status, Diff, and Log hands-on with an AI tutor that knows your code.
Start this lessonStatus, Diff, and LogWhat you'll learn
- Git status
- Git diff
- Git diff --staged
- Git log
- Log formatting
Read this lesson in your language
All lessons in this course
13 lessons- 1Init and Your First Commit25 min
- 2Status, Diff, and Log25 min
- 3Branches and Merging30 min
- 4Resolving Merge Conflicts30 min
- 5Remotes: Push, Pull, Fetch30 min
- 6Stash and Cherry-pick25 min
- 7Rebasing30 min
- 8Interactive Rebase and Squashing30 min
- 9Tags and Releases20 min
- 10Branching Workflows20 min
- 11Recovering Lost Work25 min
- 12Hooks25 min
- 13Capstone: A Full Pull Request Flow40 min
