Skip to content

Glossary: Git Beyond the Basics

git diff --cached

Also written: git diff --staged, --cached

Shows what is staged, meaning what the next commit would add. Pre-commit hooks use it to inspect a commit before it's made.

Where the book teaches it

Related terms

pre-commithook