git-checkout-index
Copy files from index to working directory
TLDR
Copy all files to working tree
SYNOPSIS
git checkout-index [options] [files...]
DESCRIPTION
git checkout-index is a low-level plumbing command that copies files from Git's staging area (index) to the working directory. It provides fine-grained control over which index entries are materialized as working tree files.
Unlike the higher-level git checkout, this command operates purely on the index without switching branches or updating HEAD. It's primarily used in Git's internal operations and specialized scripts that need precise control over working tree population.
The --prefix option enables extracting the index to an alternate location, useful for creating clean checkouts or exporting specific versions. This command is essential for understanding Git's three-tree architecture (working directory, index, and HEAD) and how file state moves between them.
PARAMETERS
-a, --all
Check out all files.-f, --force
Force overwrite.--prefix string
Output prefix.-u, --index
Update stat info.-n, --no-create
Don't create files.
SEE ALSO
git-checkout(1), git-read-tree(1)
