commands.sh

git checkout-index

all

Copy files from the index to the working tree.

More info →

Options (3)

-a, --allboolean

Restore any files deleted since the last commit

Example: git checkout-index {{[-a|--all]}}
-f, --forceboolean

Restore any files deleted or changed since the last commit

Example: git checkout-index {{[-a|--all]}} {{[-f|--force]}}
-n, --no-createboolean

Restore any files changed since the last commit, ignoring any files that were deleted

Example: git checkout-index {{[-a|--all]}} {{[-f|--force]}} {{[-n|--no-create]}}

Examples (4)

Restore any files deleted since the last commit

Restore any files deleted or changed since the last commit

git checkout-index [-a|--all] [-f|--force]

Restore any files changed since the last commit, ignoring any files that were deleted

git checkout-index [-a|--all] [-f|--force] [-n|--no-create]

Export a copy of the entire tree at the last commit to the specified directory (the trailing slash is important)

git checkout-index [-a|--all] [-f|--force] --prefix path/to/export_directory/
made by @shridhargupta | data from tldr-pages