Search

git restore

Requirements
To follow this setup, it is required to have following …
No Requirements
Restore [git restore]
Restore specified paths in the working tree with some contents from a restore source. If a path is tracked but does not exist in the restore source, it will be removed to match the source.
Synopsis [git restore --<synopsis>]
git restore [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>… git restore [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul] git restore (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>]
YAML
복사
Commonly Used Commands
Restore on working directory
git restore <file name>
git restore .
Restore on Stage
git restore --staged <file name>
git restore --staged .
Restore certain file
1.
git restore --source=<hash address> <file name>
2.
git restore .

Reference