diff --git a/pages/common/git-checkout-index.md b/pages/common/git-checkout-index.md new file mode 100644 index 0000000000..c1e448b923 --- /dev/null +++ b/pages/common/git-checkout-index.md @@ -0,0 +1,20 @@ +# git checkout-index + +> Copy files from the index to the working tree. +> More information: . + +- 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/}}`