git see what was modified in file code example Example 1: how to check git changes before commit git diff --staged Example 2: git show diff in modified file git diff [filename]