Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

25
git-checkout-index Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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/}}`