git ls-files
A low-level command that lists the files in the staging area; with --stage it also shows each one's mode and blob ID.
In more detail
It proves the index is a real list of content: git ls-files --stage shows the exact object that the next commit will record for each path. Without --stage it simply lists every tracked path.
Example
git ls-files --stageRelated terms
- staging area — Git's list of exactly what the next commit will contain, kept in the file .git/index; also called the index.
- blob — The Git object that holds the contents of one file, with no file name attached.
Taught in
- The Three Areas: Working Tree, Index, Repository — Advanced Git Internals & Distributed Workflows