check changes before commit git code example Example: how to check git changes before commit git diff --staged