git diff-index
Compare the working directory with a commit or tree object. More information: https://git-scm.com/docs/git-diff-index.
- Compare the working directory with a specific commit:
git diff-index
- Compare a specific file or directory in working directory with a commit:
git diff-index
- Compare the working directory with the index (staging area) to check for staged changes:
git diff-index --cached
- Suppress output and return an exit status to check for differences:
git diff-index --quiet
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
