CmdID

CmdID / Commands

git-restore

Restore working tree files. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Restore working tree files. Requires Git version 2.23+.

Restore an unstaged file to the staged version

git restore path/to/fileIdentify

Restore an unstaged file to the version of a specific commit

git restore --source commit path/to/fileIdentify

Discard all unstaged changes to tracked files

git restore :/Identify

Unstage a file

git restore --staged path/to/fileIdentify

Unstage all files

git restore --staged :/Identify

Discard all changes to files, both staged and unstaged

git restore --worktree --staged :/Identify

Interactively select sections of files to restore

git restore --patchIdentify