Inspecting Status, Diff & Commit History
Tracking states is managed by inspecting file alterations, staging statuses, and commit history lists.
1 Git History & Logs
Shell — Status and History CLI
# Check active file statuses (untracked, modified, staged)
git status
# Check lines altered compared to the staging area
git diff
# Check full list of commits
git log
# Inspect logs in a single line format
git log --oneline --graph --decorate
2 Code Challenge
Challenge: Modify an existing file, run
git diff to review the line modifications, stage the file, run git status to confirm it is ready for commit, and execute the commit.