After creating commits to save project states, the next step is learning how to examine the history you've built and correct mistakes. This chapter focuses on inspecting changes and revising your commit history.
You will practice using git diff to compare different versions of your work, git reset to unstage files, and git commit --amend to adjust the most recent commit. Additionally, you'll see how git revert provides a safe way to undo earlier commits and how to manage files tracked by Git using git rm and git mv. These commands provide essential tools for understanding your project's evolution and managing changes effectively.
3.1 Comparing Changes (git diff)
3.2 Viewing Changes Between Commits
3.3 Viewing Staged vs Unstaged Changes
3.4 Unstaging Files (git reset HEAD <file>)
3.5 Amending the Last Commit (git commit --amend)
3.6 Reverting Commits (git revert)
3.7 Removing Files from Git (git rm)
3.8 Moving or Renaming Files (git mv)
3.9 Practice: Inspecting and Modifying History
© 2026 ApX Machine LearningEngineered with