git diff
Table of Contents
git diff
reference
git diff --exit-code # Exits 0: no differences, 1: differences
git diff --quiet # No outputs. Implies --exit-code
git diff --name-only # Show only names of changed files
Commit only when there's something staged howto
Or just one liner: