git checkout-index
Copy files from the index to the working tree. More information: https://git-scm.com/docs/git-checkout-index.
-
Restore any files deleted since the last commit:
git checkout-index --all
-
Restore any files deleted or changed since the last commit:
git checkout-index --all --force
-
Restore any files changed since the last commit, ignoring any files that were deleted:
git checkout-index --all --force --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 --all --force --prefix={{path/to/export_directory/}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.