git how to see staged changes code example Example 1: how to see staged files in git git diff --name-only --cached Example 2: git check staged changes git diff --cached