mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-07 14:57:12 +00:00
Update cheatsheets
This commit is contained in:
25
git-checkout-index
Normal file
25
git-checkout-index
Normal 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/}}`
|
||||
Reference in New Issue
Block a user