how to view changes made in git file code example Example: how to check git changes before commit git diff --staged