Command
git restore
Explanation
git restore is used to restore working tree files (Git 2.23+). It restores the working tree files (Git 2.23+).
Examples
Discard unstaged changes
git restore file.txt
Unstage file
git restore --staged file.txt
git restore
git restore is used to restore working tree files (Git 2.23+). It restores the working tree files (Git 2.23+).
Discard unstaged changes
git restore file.txt
Unstage file
git restore --staged file.txt