Skip to content
The Git Crypt

/static/cripta/en/ossada/ls-files/

Menu

GIT-014 · Plumbing

git ls-files

The list of what the index actually sees, with no opinion from the working tree.

The index is a list of files with mode, hash and stage — and ls-files prints it unretouched. Alone, it lists what is tracked; -s exposes each entry's backstage; --others --exclude-standard flips the question and shows what exists on disk but git doesn't know yet.

It is the debugger for the strange cases: the file status insists on ignoring, the conflict stuck in three stages, the executable that lost its permission bit. When porcelain confuses, the raw index clarifies.

$ git ls-files -s templates/sub-article.html
100644 4f2a8c1d9e3b7a604c8f2e5d1b9a3c7e6f0d4b28 0	templates/sub-article.html
$ git ls-files --others --exclude-standard
static/jaque/retrato.jpg
One index entry inside out, and one file still outside.