Restore classed as experimental and so may change in future. Note that restore will not remove untracked files. For that you can use clean , remove , checkout or reset commands. Prepend filename with path where necessary.

[remove all changes made to local working tree restoring to last commit.]

git restore .

[remove changes from specific file in local working tree restoring file to last commit]

git restore <file-name>

[remove files from staging area but retain the changes in the local working tree]

git restore --staged .

[remove named file from staging area but retain the changes in the local working tree]

git restore --staged <file-name>

[remove types of file from staging area but retain the changes in the local working tree]

git restore --staged *.<file-ext>

[restore file to a specific committed version]

git restore --source <commit-ref> <file-name>

[restore chunks of changes interactively]

git restore --patch

https://git-scm.com/docs/git-restore