Web development
History and Differences
Updated Oct 28, 2026
git log shows commit history and git diff shows differences. Review changes before saving a commit. A commit identifier can help you locate a specific snapshot; reading history does not change files.
What you’ll learn
Understand and practise history and differences.
Explanation
git log shows commit history and git diff shows differences. Review changes before saving a commit. A commit identifier can help you locate a specific snapshot; reading history does not change files.
git log បង្ហាញប្រវត្តិ commit និង git diff បង្ហាញភាពខុសគ្នា។ ពិនិត្យការផ្លាស់ប្ដូរមុន commit។
Example
Run git diff to inspect an edited stylesheet.
Practice
Which command can show unstaged changes?
Answer and explanation
Show answer / បង្ហាញចម្លើយ
git diff displays unstaged changes by default.
Quick recap
git log shows commit history and git diff shows differences.