see what js modified 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]